Should we deprecate comma?

ponce contact at gam3sfrommars.fr
Mon Mar 24 02:13:38 PDT 2014


On Monday, 24 March 2014 at 09:09:30 UTC, monarch_dodra wrote:
> //----
> for (size_t i, j ; someCondition() ; ++i, ++j )
> {...}
> //----
>
> I think this is *the* single most common use of operator comma, 
> and I also think it is perfectly legit. Sure, it can easily be 
> migrated away from, but I think it would be gratuitous breakage 
> of good code.

Legit but largely useless.
In every cases I've seen where this idiom appears, you can derive 
j from i and the compiler is able to generate the very same code.


More information about the Digitalmars-d mailing list