The Comma Operator's Deprecation Can't Come Soon Enough

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 23 12:07:03 PDT 2014


On Wed, Jul 23, 2014 at 12:04:52PM -0700, Ali Çehreli via Digitalmars-d wrote:
[...]
> Reminds me... Is everybody aware of D's for syntax?
> 
> import std.stdio;
> 
> void main()
> {
>     for ( {
>             int i = 42;
>             double d = 1.5;
>             string s = "hello";
>         } i < 100; i *= 2) {
> 
>         writefln("In the loop with %s %s %s", i, d, s);
>     }
> }
> 
> :)
> 
> Also note the absence of ; before the loop condition.
[...]

:-O

Arghhhh... my eyes are bleeding from this nasty syntax... :-(


T

-- 
This sentence is false.


More information about the Digitalmars-d mailing list