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 SAA19640; Thu, 13 Sep 2001 18:50:46 +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 SAA19855 for ; Thu, 13 Sep 2001 18:50:46 +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 f8DGojP25475 for ; Thu, 13 Sep 2001 18:50:45 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id JAA12621 for ; Thu, 13 Sep 2001 09:50:44 -0700 (PDT) Date: Thu, 13 Sep 2001 09:50:44 -0700 (PDT) From: Brian Rogoff To: Subject: Re: [Caml-list] function vs. parser In-Reply-To: <20010913180919.B30967@verdot.inria.fr> Message-ID: <20010913092524.V29244-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, Daniel de Rauglaudre wrote: > > since "parser" is a good name for a type and at least in English > > there are no good synonyms. If you start writing combinator parsers > > you have to hack the keyword parser to be parser_t or _parser or > > somesuch, which is a little ugly. > > 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. 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. We'll not get into the Lisp vs Scheme debate here I think, but yeah, you're right, managing the namespace is an old problem. Maybe in a post-Unicode world everything will be OK. > > Hey, I said it is a *petty* complaint! ;-) > > Well, there is some syntactic preprocessor for OCaml - I don't > remember the name - which can do that... Touche. Wow, I notice that the version of the manuals for that preprocessor exceeds the OCaml version number. Now that is fast turnaround time! -- 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