Re: Expression-local variables and 'let'

Isaac Gouy <[email protected]> Fri, 20 Feb 2004 07:42:52 -0800 (PST)
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
>val balance = currentBalance() in display(balance, warn: balance < 0);
>display(val balance = currentBalance(), warn: balance < 0);

(I haven't been following this closely enough, but...)

Why wouldn't we just do the 'balance < 0' within the method?

   display(currentBalance());

   void display(Money balance){ if (balance<0){} }

or is there some suggestion we would dispatch on the parameter, in
which case wouldn't we try:

   void display(Money balance){ }
        display(balance<0){ }
        display(balance>=0){ }



> >BTW, did you know that "val" and "var" are written and pronounced
> >the same in a few languages, including Japanese 
> I hadn't thought about that!

Me neither, small world isn't it.

> I'm not convinced yet, unfortunately.
Neither am I about 'let .. in ..' 



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools


-------------------------------------------------------
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