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

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 15 09:10:36 PDT 2014


On Tuesday, 15 July 2014 at 16:01:37 UTC, Frustrated wrote:
> This isn't a bug! It's a logic mistake.
>
> Why the heck would you have such a line anyways?
>
> alias flattenedType = typeof(R.init.front, depth - 1);
>
> The 2nd "argument" to typeof makes no sense. It shouldn't be on 
> that line at all. Total fail by the programmer.

Yes, I wasn't thinking and typed "typeof(R.init.front, depth - 
1)" because just a moment before a few lines down I typed 
"flattenedType!(typeof(R.init.front), depth - 1)". Once the comma 
operator is deprecated, however, it will be impossible to make 
this kind of careless mistake.


More information about the Digitalmars-d mailing list