POV-Ray : Newsgroups : povray.off-topic : My first C++ program : Re: A test Server Time
1 Oct 2024 03:13:21 EDT (-0400)
  Re: A test  
From: Darren New
Date: 22 Sep 2008 17:16:22
Message: <48d80b26$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.