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 UAA21557; Thu, 13 Sep 2001 20:05:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 UAA21694 for ; Thu, 13 Sep 2001 20:05:30 +0200 (MET DST) Received: from smtp1.cswv.com (smtp1.cswv.com [4.17.129.17]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8DI5SP05198 for ; Thu, 13 Sep 2001 20:05:29 +0200 (MET DST) Received: from smtp1.cswv.com ([4.17.129.17]) by smtp1.cswv.com with Microsoft SMTPSVC(5.5.1877.197.19); Thu, 13 Sep 2001 14:05:54 -0400 Received: FROM exchange1.cswv.com BY smtp1.cswv.com ; Thu Sep 13 14:05:53 2001 -0400 Received: by exchange1.cswv.com with Internet Mail Service (5.5.2653.19) id ; Thu, 13 Sep 2001 14:09:32 -0400 Message-ID: From: "Krishnaswami, Neel" To: caml-list@inria.fr Subject: Re: [Caml-list] function vs. parser Date: Thu, 13 Sep 2001 14:09:30 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff [mailto:bpr@best.com] wrote: > On Thu, 13 Sep 2001, Daniel de Rauglaudre wrote: > > > > Same problem with "type": in my parsers, I would like to > > have "expr", "patt" and "type". I named it "ctyp", ugly too. > > And "constraint"... which is named "constrain" in the OCaml parser. > > It has been the problem with keywords since the Pascal language... > > It's funny that you should say that since the modern functional > languages play more tricks with lexical syntax than more mainstream > languages in order to carve up the limited namespace. We already use > capitalization and also funny 'identifiers for type variables. In Dylan > they rely on a bracketing convention for to prevent clashes, > but I think it's only a convention. Yeah, it's a convention, since types are first-class values in Dylan. Such conventions are easy to create in Dylan because it's way permissive about which characters are legal in identifiers than most languages are -- almost all punctuation is legal. This produces a different set of complaints, though: people are unhappy that they have to write "foo + bar", because "foo+bar" is a distinct identifier. > In MLs, people generally don't seem to like such conventions (I've > gotten disgusted looks when I use the C convention of suffixing _t > to type names in order to create a unique namespace for types :-) but > the ugliness pops up somewhere else. Doesn't Caml use such a convention to set the precedence of infix functions, so that *.. has higher precedence that +..? I think that's pretty neat actually. I find it much more readable than Haskell's `backquote` mechanism. > Maybe in a post-Unicode world everything will be OK. Yeah, right. Combining characters and different code values with identical glyphs and the like make certain that the only result of Unicode adoption will be to increase the amount of confusion. I wonder if there's a computer equivalent to the second law of thermodynamics: the incoherence of a computer system always increases, or something like that. :) -- Neel Krishnaswami neelk@cswcasa.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr