Feature request: extending comma operator's functionality

Jonathan M Davis jmdavisProg at gmx.com
Thu Oct 4 17:40:59 PDT 2012


On Friday, October 05, 2012 02:33:45 timotheecour wrote:
> Is the plan to deprecate comma operator for chaining expressions?

That's all the comma operator does. If it's not chaining expressions, it's not 
the comma operator (e.g. variables declarations do _not_ use the comma 
operator even though they can use commas).

There is a proposal to remove the comma operator, altering for loops so that 
they explicitly support using commas like they currently do but otherwise 
completely removing the comma operator:

http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP19

> I would love to see more syntactic sugar to support tuples, and
> comma operator would be the best fit for that purpose.

That's one of the main reasons for the proposal, but nothing has been decided 
yet.

The discussion is here:

http://forum.dlang.org/thread/k3ns2a$1ndc$1@digitalmars.com

- Jonathan M Davis


More information about the Digitalmars-d mailing list