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 JAA10012 for caml-red; Tue, 22 Aug 2000 09:49:29 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA06358 for ; Tue, 22 Aug 2000 02:43:15 +0200 (MET DST) Received: from ropas.kaist.ac.kr (ropas.kaist.ac.kr [143.248.92.105]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e7M0h9f25242; Tue, 22 Aug 2000 02:43:13 +0200 (MET DST) Received: (from kwang@localhost) by ropas.kaist.ac.kr (8.9.3/8.9.3) id JAA10162; Tue, 22 Aug 2000 09:38:05 +0900 (KST) Date: Tue, 22 Aug 2000 09:38:05 +0900 (KST) Message-Id: <200008220038.JAA10162@ropas.kaist.ac.kr> X-Authentication-Warning: ropas.kaist.ac.kr: kwang set sender to kwang@ropas.kaist.ac.kr using -f From: Kwangkeun Yi To: Pierre.Weis@inria.fr CC: skaller@maxtal.com.au, caml-list@inria.fr In-reply-to: <200008212124.XAA05094@pauillac.inria.fr> (message from Pierre Weis on Mon, 21 Aug 2000 23:24:47 +0200 (MET DST)) Subject: Re: Question on language design (keywords vs Pervasives) References: <200008212124.XAA05094@pauillac.inria.fr> Sender: weis@pauillac.inria.fr > I'm sure that there is no ``more primitive function'' than raise to > raise an exception. So sorry, you cannot define raise ``in terms of a > more primitive function'' in Caml. You would need a language with > call/cc to express that, and Caml is not this language. To make it precise, we don't even need call/cc. Just a kind of cps transformation that carries two continuations (one for normal continuation and the other for handler continuation) removes all the raise/try expressions. The transformation is well-known. See @InProceedings{KiYiDa98, author = "Jung-taek Kim and Kwangkeun Yi and Olivier Danvy", title = "Assessing the Overhead of ML Exceptions by Selective CPS Transformation", pages = "103-114", booktitle = "The Proceedings of the ACM SIGPLAN Workshop on ML", year = 1998, url = "http://ropas.kaist.ac.kr/~kwang/paper/98-ml-kiyida.ps.gz", month = sep } -Kwang -- Kwangkeun Yi http://cs.kaist.ac.kr/~kwang