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

Yota via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 23 12:29:48 PDT 2014


On Wednesday, 23 July 2014 at 17:59:42 UTC, sigod wrote:
> On Wednesday, 23 July 2014 at 17:25:43 UTC, Yota wrote:
>> It appears Microsoft is musing the idea of adding this 
>> operator to C# and VB.Net.  Only instead of it being a comma, 
>> they're going with a semicolon.
>> https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Documentation
>>
>> I dislike the comma operator as well, but would there be any 
>> problems if it were a semicolon instead?  I think the new 
>> symbol would fit well in for() loops.
>
> `(var x = Foo(); Write(x); x * x)`
>
> Looks kinda strange.

Fairly consistent with functional languages like F#, however.

(let x = Foo() in (Write x; x * x))


More information about the Digitalmars-d mailing list