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 XAA04896 for caml-red; Mon, 21 Aug 2000 23:31:11 +0200 (MET DST) 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 VAA31439 for ; Mon, 21 Aug 2000 21:48:20 +0200 (MET DST) Received: from isil.localdomain (exodus-rtr-2.arsdigita.com [216.34.106.252]) by nez-perce.inria.fr (8.10.0/8.10.0) with ESMTP id e7LJmJb25112; Mon, 21 Aug 2000 21:48:19 +0200 (MET DST) Received: by isil.localdomain (Postfix, from userid 1000) id E0DFA369DB; Mon, 21 Aug 2000 15:47:53 -0400 (EDT) To: Pierre Weis Cc: jmp@arsdigita.com (John Prevost), caml-list@inria.fr Subject: Re: Question on language design (keywords vs Pervasives) References: <200008210858.KAA27538@pauillac.inria.fr> From: John Prevost Date: 21 Aug 2000 15:47:52 -0400 In-Reply-To: Pierre Weis's message of "Mon, 21 Aug 2000 10:58:26 +0200 (MET DST)" Message-ID: <877l9apf9z.fsf@localhost.localdomain.> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: weis@pauillac.inria.fr >>>>> "pw" == Pierre Weis writes: pw> You're right, there is no really good example that uses pw> redefinition of raise. That's why the advantage to be able to pw> redefine it may overcome the inconvenience of not being always pw> sure of its meaning. Actually, I just thought of one. :) If you redefine raise in a special way, you could have it report that it was raising exceptions, even if those exceptions are later caught. Might be good for analyzing your code. pw> You're right, we don't want to have zillions of keywords. On pw> the other hand, you also need to have some level of confidence pw> into the words you use in the language, otherwise you can pw> write horrors as the famous pw> if else then else else then pw> when then and else are not reserved. Right. But I don't think this is necessarily the case for raise. I just gave a good example above. There's also the possibility of somebody who could really care less about raising exceptions most of the time (e.g. me) but who has some code which performs an operation named "raise". In that context, having to fight the system to get around it is bad. There's always a tension here. For example, when I'm writing PL implementations, the fact that "type" is a keyword is rather upsetting. But, I can deal--especially because I know that O'Caml doesn't have that many gratuitous keywords--everything's there for a reason. John.