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 NAA23387 for caml-red; Fri, 18 Aug 2000 13:16:33 +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 EAA19350 for ; Fri, 18 Aug 2000 04:07:40 +0200 (MET DST) Received: from ropas.kaist.ac.kr (ropas.kaist.ac.kr [143.248.92.105]) by nez-perce.inria.fr (8.10.0/8.10.0) with ESMTP id e7I27cH09272 for ; Fri, 18 Aug 2000 04:07:39 +0200 (MET DST) Received: (from reig@localhost) by ropas.kaist.ac.kr (8.9.3/8.9.3) id LAA05417; Fri, 18 Aug 2000 11:07:05 +0900 (KST) Date: Fri, 18 Aug 2000 11:07:05 +0900 (KST) Message-Id: <200008180207.LAA05417@ropas.kaist.ac.kr> X-Authentication-Warning: ropas.kaist.ac.kr: reig set sender to reig@ropas.kaist.ac.kr using -f From: Fermin Reig To: caml-list@inria.fr Subject: Question on language design (keywords vs Pervasives) Reply-To: reig@dcs.gla.ac.uk Sender: weis@pauillac.inria.fr Hi, I'm curious about some interesting language design choices in ocaml 3.0. * "raise", "exn" are not keywords, but definitions in the Pervasives module. This means that I can rebind them, for ex., like this: # type exn = char;; type exn = char # let raise x = x + 1;; val raise : int -> int = Similarly for other types in the Pervasives module, like int, etc. (However, "exception", for declaring a new exception is a reserved word). I can speculate that the intention is precisely that praogrammers be able to rebind them at will, or maybe that it simplifies implementing interpreters/compilers, but I don't know for sure. Could anyone (preferably someone involved in the design) comment on the rationale for these choices? Thanks, Fermin Reig ------------------------------------------------------ Department of Computing Science, University of Glasgow http://www.dcs.gla.ac.uk/~reig