From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA10107 for caml-red; Mon, 11 Dec 2000 18:32:07 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA19610 for ; Sat, 9 Dec 2000 19:56:57 +0100 (MET) Received: from igw8.watson.ibm.com (igw8.watson.ibm.com [198.81.209.20]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eB9Iuur11628 for ; Sat, 9 Dec 2000 19:56:56 +0100 (MET) Received: from sp1n189at0.watson.ibm.com (sp1n189at0.watson.ibm.com [9.2.104.62]) by igw8.watson.ibm.com (8.9.3/8.9.3/05-14-1999) with ESMTP id NAA09386; Sat, 9 Dec 2000 13:56:48 -0500 Received: from nautilus-chet.watson.ibm.com (lig32-226-130-209.us.lig-dial.ibm.com [32.226.130.209]) by sp1n189at0.watson.ibm.com (8.9.3/Feb-20-98) with ESMTP id NAA05156; Sat, 9 Dec 2000 13:56:45 -0500 Received: from bismarck-chet.watson.ibm.com (bismarck.chet.org [192.168.10.15]) by nautilus-chet.watson.ibm.com (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA00497; Sat, 9 Dec 2000 13:55:27 -0500 Received: from bismarck (bismarck.chet.org [127.0.0.1]) by bismarck-chet.watson.ibm.com (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA01988; Sat, 9 Dec 2000 13:48:59 -0500 Message-Id: <200012091848.NAA01988@bismarck-chet.watson.ibm.com> X-Authentication-Warning: bismarck.chet.org: Host bismarck.chet.org [127.0.0.1] claimed to be bismarck To: STARYNKEVITCH Basile cc: Joe Lisp , caml-list@inria.fr Subject: Re: callcc/cps-style programming In-Reply-To: Your message of "Thu, 07 Dec 2000 09:31:46 +0100." <14895.19186.716809.936261@gargle.gargle.HOWL> References: <20001206201313.28498.qmail@web9203.mail.yahoo.com> <14895.19186.716809.936261@gargle.gargle.HOWL> Date: Sat, 09 Dec 2000 13:48:59 -0500 From: Chet Murthy Sender: weis@pauillac.inria.fr Hmm ... I'm not sure I believe this. I worked a lot with SML/NJ, and aside from using continuations to implement lightweight threading, and using them to do backtracking, there were really no good uses for them. We can dispatch backtracking quite easily -- in modern main-line business and scientific applications, naive use of backtracking (which is all that call/cc really buys you) isn't really very useful. It's about as useful as constraint logic programming was to operations research. I'm talking about economic utility -- helping problems that matter to somebody with either money, or lives, to save. [It's not that logic-programming doesn't have its place -- certainly, business-rule systems could benefit from a healthy dose of logic-programming rigor -- but rather that naive application of techniques from programming-language research almost always falls on its sword. It takes a pretty careful application of all this advanced research, to "get it right". Witness that out of all the implementation of ML, only CAML-Light really is fast enough, small enough, and portable enough, to be worth bothering with. That's a stunning failure rate, considering how many different ML implementations there are out there.] As for lightweight threading, well, it's nice that you can implement them with continuations, but the real purpose of threading is to interface with some external source of events. Every such source (except for the lowest-level X windows protocol) requires operating system-level thread-contexts, so you'll end up needing heavyweight threads anyway. Finally, well, as Ousterhout noted in his seminal paper on events vs. threads, there are rarely any good reasons to use threads, if you have sufficient abstraction power (closures!) in your language. So, well, no, I guess I don't really see how call/cc would be a good thing to add to CAML, or, for that matter, to any language. I can understand that it's very useful in academic languages, like Scheme or SML/NJ. But for languages that (perhaps also) aspire to real-world use, and to solving problems posed from outside the world of programming-language semantics, well, I greatly doubt that call/cc is a good thing. --chet-- >>>>> "SB" == STARYNKEVITCH Basile writes: >>>>> "Joe" == Joe Lisp writes: Joe> Is anyone working on callcc for OCaml? SB> I am not working on it (although I would like to...) SB> However, adding explicit continuations to Ocaml is an SB> important task: