euphoria after 4.0
- Posted by jacquesd Jan 07, 2009
- 861 views
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 legal and n = 4
integer n = fct(2)
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