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 WAA23586; Thu, 13 Sep 2001 22:55:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA24056 for ; Thu, 13 Sep 2001 22:55:50 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8DKtmP29992 for ; Thu, 13 Sep 2001 22:55:49 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id NAA02018 for ; Thu, 13 Sep 2001 13:55:48 -0700 (PDT) Date: Thu, 13 Sep 2001 13:55:48 -0700 (PDT) From: Brian Rogoff To: Subject: Re: [Caml-list] function vs. parser In-Reply-To: Message-ID: <20010913134256.K27066-100000@shell5.ba.best.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 13 Sep 2001, Krishnaswami, Neel wrote: > 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. This is a good thing IMO. The only exceptions of course being things like (), ;, and ",". > > > 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 +..? Yes, be careful with | vs || and stuff like that with infixes. I got burned there recently. Doh! > I think that's > pretty neat actually. I find it much more readable than Haskell's > `backquote` mechanism. But you can use names with backquotes. > > Maybe in a post-Unicode world everything will be OK. I guess I really should have put a :-) there, huh? > 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. :) I heard Robert Dewar describe it as the ratchet effect of programming language design. Nothing ever gets removed, just added. Oh well, as our erstwhile moderator said, CamlP4 rocks for the syntax whiner. Maybe we should have another mailing list, the caml-syntax-whining-list, for people like me who like to complain about syntax? :-) -- Brian ------------------- 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