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 LAA12204 for caml-red; Tue, 22 Aug 2000 11:15:57 +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 EAA07606 for ; Tue, 22 Aug 2000 04:25:02 +0200 (MET DST) Received: from localhost.localdomain (brian-boitano230.zip.com.au [210.23.147.230]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e7M2Ovf25886; Tue, 22 Aug 2000 04:24:58 +0200 (MET DST) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id MAA07266; Tue, 22 Aug 2000 12:25:53 +1000 Message-ID: <39A1E4B1.1D243ECE@maxtal.com.au> Date: Tue, 22 Aug 2000 12:25:53 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 CC: Pierre.Weis@inria.fr, caml-list@inria.fr Subject: Re: Question on language design (keywords vs Pervasives) References: <200008212124.XAA05094@pauillac.inria.fr> <200008220038.JAA10162@ropas.kaist.ac.kr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Pierre wrote: > 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. Perhaps my intent was not understood. The idea is to provide a primitive '_raise' construction, but provide a wrapper function 'raise' in the standard library which does nothing but call _raise: let raise ex = _raise ex which allows the raise function to be rebound by the client, catching all exceptions raised using the 'raise' function in those sources where the client has in fact rebound 'raise' before use. Naturally, this will not affect (compiled) library code unless it, too, is recompiled, so not all exceptions are trapped this way. This can be done right now by the client, simply defining let raise' ex = raise ex even if raise is a primitive construction, provided that the source module uses raise' everywhere, rather than raise. So it can be done now, by search and replace of raise by raise', which is not really much harder than rebinding. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net