|
|
andrel wrote:
> My point was always the other way around: does Haskell allow you to
> introduce concepts and control structures that from that point on will
> become conceptually 'part of the language' for you?
No, I don't think it does. I don't think it's possible to write "case"
or "let" in Haskell. That's kind of the point. I think you're taking
"reserved words" to mean the same as "meaningful concepts." I'm talking
from the point of view of someone building a compiler or something, not
from someone conceptualizing about an application.
> To the extent that
> for you they behave like 'reserved words'.
I don't care what it behaves like in my brain. I care what happens when
it compiles.
>> OK, maybe I misphrased it. How does the compiler distinguish the
>> variable name from the syntactic form that "case" currently introduces
>> in Haskell? If "you don't", then it means your compiler's behavior is
>> unspecified when you use the word "case" as a variable. People
>> generally don't like compiler behavior to be unspecified for valid
>> programs.
>
> Normal scoping rules may apply.
Then it wouldn't be a reserved word, would it? :-)
I don't know if Haskell actually disallows the use of variables named
the same as "reserved words", but if it doesn't, then that's a reserved
word.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
|