[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rough first impressions
> Date: Mon, 14 Apr 2003 16:59:45 -0400
> From: Bob Cassels <bobcassels@netscape.net>
>
> mvanier@cs.caltech.edu wrote:
>
> >>Date: Mon, 14 Apr 2003 12:12:24 -0400
> >>From: Jonathan Bachrach <jrb@ai.mit.edu>
> >>
> >>
> >>actually what i was thinking was changing goo over to using case
> >>sensitivity and having all caps be the convention for types. this
> >>saves characters and is pretty standard and lets you name the
> >>constructors by lowercasing the type name. lots of lispers object to
> >>case sensitivity and using the shift key (except to type parentheses).
> >>
> >
> >It seems reasonable to have a different namespace for types. I think
> >all-caps is PRETTY HEAVY THOUGH. What about having the first letter
> >capitalized? Many languages (prolog, ocaml, haskell) use this convention
> >for various purposes.
> >
> >
>
> Yuck. I thought we'd moved beyond this kind of syntax. Fortran
> variables that begin with i-n are integers, Basic variables that end
> with $ are strings....
>
> Case sensitivity detracts from readability. As do short abbreviations
> that don't mean anything.
>
> But I guess I'm an old fogey who likes to read words.
>
>
I'm with you on point #2 ;-)
As for point #1, I think there is a qualitative difference between using
syntax to denote a specific type (as in old Fortrans, Basic and perl) and
using syntax to denote a whole class of entities (in this case, types).
That seems much more acceptable to me, but personally I don't care that
much either way. I do like the idea that I can define a variable as (say)
"list" without worrying if it conflicts with the name of the list type.
Even if there are separate namespaces, I think that "list|<List>" is
clearer than "list|<list>". However, the <> syntax already provides a huge
hint, so maybe it isn't needed.
Separate question: what about constrained types e.g. "list of int"? How
would those work in the type syntax? <list<int>>?
Mike