Cristiano Paris <cristiano.pa...@gmail.com> wrote in article 
<afc62ce20902120855i77acf725p1069aab21037a...@mail.gmail.com> in 
gmane.comp.lang.haskell.cafe:
> In effect, this is a bit different from the syscall service routine
> described by Oleg, as the scheduler function reacts in different ways
> for subsequent calls (the first time feeds "Hello!", the second one
> "World!", in a nice monad style). Yet, I liked the separation between
> the scheduler and the job, which are two completely different values
> and which I tried to keep.

It's not unheard of for the scheduler to react in different ways to the
same system call -- I'm thinking of reading from a file, for example.

> As this is (almost) my first time using delconts, could you provide
> feedback, comments, opinions about my piece of code and the topic in
> general (convenience, performances, alternatives and so on)?

You clearly understand the whole idea, and your code demonstrates it in
a nice way.  Oleg and I have found this programming style particularly
convenient when we need to
 - fork processes (i.e., backtrack in the monad),
 - run the same processes under different schedulers (e.g., a debugger),
 - nest the applications of schedulers (i.e., provide virtualization).

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
"Attending a mathematics lecture is like walking through a
thunderstorm at night. Most of the time you are lost, wet
and miserable but at rare intervals there is a flash of
lightening and the whole countryside is lit up." - Tom Koerner

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to