caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Krishnaswami, Neel" <neelk@cswcasa.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] function vs. parser
Date: Thu, 13 Sep 2001 14:09:30 -0400	[thread overview]
Message-ID: <B1E4D3274D57D411BE8400D0B783FF322E86FF@exchange1.cswv.com> (raw)

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 <types> 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


             reply	other threads:[~2001-09-13 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-13 18:09 Krishnaswami, Neel [this message]
2001-09-13 20:55 ` Brian Rogoff
  -- strict thread matches above, loose matches on Subject: below --
2001-09-13 21:49 Krishnaswami, Neel
2001-09-14 12:50 ` Gerd Stolpmann
2001-09-13  8:20 SooHyoung Oh
2001-09-13  8:48 ` Daniel de Rauglaudre
2001-09-13 14:13   ` Brian Rogoff
2001-09-13 16:09     ` Daniel de Rauglaudre
2001-09-13 16:50       ` Brian Rogoff
2001-09-13 16:51       ` Pierre Weis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1E4D3274D57D411BE8400D0B783FF322E86FF@exchange1.cswv.com \
    --to=neelk@cswcasa.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).