Re: Expression-local variables and 'let'

[email protected]
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
Isaac wrote:
> "let" is a command, it's active and direct - "let this be true!".

"let" is imperative and "val" is declarative? Hmm...now I am starting to not
mind "val" so much... :) Seriously, though, I don't think this is too important.

Daniel wrote: 
> Cannot we consider that 'val' does not declare a variable: it gives a
> name to a value?

> > Agreed. Unfortunately, that's also why it does not seem right in the 
> > middle of an expression.

Variable declarations do not feel right in the middle of expresions in general,
whether "let" or "val" is used.

> We can go around and around. 
> Seems to me that we're optimizing for the (wild assed guess) 20% of
> user-defined statements, rather than ordinary assignments. And I'd side
> with the Ada designers for readability over concision - readability
> helps me write correct code.

I agree a lot with this sentiment. The proposed syntax is only readable in one
specialized construct that is hardly used. That is why I still advocate
"let..in," since it would be useful in the majority of programs and is more general.

- Brian




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.