Yet Another Case Question
Greg Ewing (using news.cis.dfn.de)
me at privacy.net
Tue Feb 25 03:48:47 CET 2003
Alex Martelli wrote:
> You want case-sensitivity ENFORCING a capitalization convention?
> Haskell has it, I believe -- try naming a typeclass without a
> leading capital letter, or a function with a capital letter, and
> the compiler will snarl at you. I don't like it, but I can see
> it DOES make some sense, particularly in a language that is very
> particular about static typing.
In Haskell, I don't think it has anything to do with
static typing, but is a syntactic issue -- the compiler
has to be able to tell whether it's looking at a constructor
name or not in order to parse things properly.
Some other method could have been chosen, but it would
probably involve some extra punctuation or something,
and then the syntax wouldn't have looked so clean and
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
More information about the Python-list