Hi,
So which 10% of the Event module is poorly implemented? Or is it
that the Event module doesn't have a spawn function and relies on
the Thread module? Is it fixable (could a CML module be created for
OCaml that faithfully implements the run-time described in Reppy's
book)?
That 10% was a figure of speech. I cant know how much the missing
functionality affects the final application. Continuations are just
another way of stating "spaghetti stacks", since they represent the
entire "future" of the program -- i.e., the stacked contexts to be
returned to later.
My point was that OCaml's runtime is modeled against the use of a
single machine stack - hence the great speed. Spaghetti stacks
require explicit handling in the heap memory, and so would be slower.
But the great thing about spaghetti stacks is that a "continuation"
can be created as a first-class object, and easily reclaimed by the
GC. [Examples: CML, Smalltalk, Erlang, others?]
Technically, you can do anything in any language... so OCaml is
technically "fixable" in this regard. But is it practical? feasible?
I doubt it.
Whether the shortcomings are important to you depends on your
expectations and performance requirements. I have successfully used
the notion of Reppy Channels in OCaml, Lisp, Scheme, and elsewhere.
Only you can decide if the overhead of thread creation, the lack of
GC thread reclamation, and the act of throwing new threads at every
decision point, is too much, or inconsequential.
Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ 85750
email: d...@refined-audiometrics.com
phone: 1.520.390.3995
web: http://refined-audiometrics.com
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs