Re: Expression-local variables and 'let'
Isaac Gouy <[email protected]>
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
> using(val in = ...) {
> ...
> }
> is more readable than
> {
> let in = ...;
> using (in) {
> ..
> }
> }
Maybe
using(in = ...){}
is more readable still, like
for (i: 1..10){}
> class Bar { ...}
> <Bar Alike> Alike foo(int x, Alike bar) { ... }
>
> The thing is that for methods declared inside a class, there is no
> way to constrain the type of this, so 'alike' was needed.
So that in that example there's nothing special about 'Alike' - it's
just a type parameter?
<Bar B> B foo(int x, B bar) { ... }
So 'alike' is a fix for the "within a class" syntax sugar?
__________________________________
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