euphoria after 4.0

new topic     » topic index » view thread      » older message » newer message

here's what I would like to see:
1) first order functions
this mean no need for routine_id(), exemple:
function sqare(integer x)
return x*x
end function
integer fct = foo now fct contain routine_id of foo
integer n = fct(2)
legal and n = 4
atom cb = call_back(square) legal

2) task_yield() become a function and task_resume(routine_name) added

 
--exemple code 
procedure producer(integer n=10) 
integer i=0    
 while  i <=n do 
   task_yeld(i) 
   i += 1 
 end while       
end procedure 
-- no need for routine_id or task_id as the front end can generate and keep 
-- an internal table of it. 
procedure consumer() 
 
   task_create(producer,{100}) 
   while task_status(producer)!=-1 do 
      ? task_resume(producer) 
   end while    
end procedure 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu