From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA07040; Tue, 29 May 2001 13:26:08 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA07024 for caml-list@pauillac.inria.fr; Tue, 29 May 2001 13:26:07 +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 DAA31542 for ; Tue, 29 May 2001 03:08:05 +0200 (MET DST) Received: from localhost.localdomain (ppp181.dyn147.pacific.net.au [210.23.147.181]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f4T180915497; Tue, 29 May 2001 03:08:01 +0200 (MET DST) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id LAA17015; Tue, 29 May 2001 11:07:56 +1000 Message-ID: <3B12F66C.5F5793F9@ozemail.com.au> Date: Tue, 29 May 2001 11:07:56 +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 To: Xavier Leroy CC: David Fox , caml-list@inria.fr Subject: Re: [Caml-list] ocaml and named constants References: <20010528143238.D19801@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: > > I ask because it seems odd that camlp4 includes > > a feature for creating real defined constants that are textually > > substituted before compilation begins. > > One motivation for this is to be able to put named constants in > patterns, e.g. > > match get_next_byte() with > mpg_joint_stereo -> ... > | mpg_78rpm -> ... > | _ -> ... > > which cannot be done in plain ML. Is there any semantic reason why one cannot use variables, or even expressions? Apart from the obvious syntactic problem. -- 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 ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr