Things that may be removed

Nick Sabalausky a at a.a
Wed Dec 24 09:05:33 PST 2008


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:gis9up$n5m$1 at digitalmars.com...
> Nick Sabalausky:
>> Disagree. Octal can often useful on low-level embedded stuff.
>
> I think the point was to improve the syntax of octal numbers, not to 
> remove them. So 0125 becomes a syntax error (as usual to keep 
> compatibility with C, otherwise it's better to make it just mean 125), and 
> invent a less error-prone syntax for octal numbers. For example 0oxxxx.
>
>
>> > * the comma operator (allow in selected places, eg for(; ;++a, ++b)).
>> What is the problem with these?
>
> Generally the comma operator is useful only in particular situations, and 
> in other situations it may lead to errors.
>
> This is an acceptable use (but this too may lead to some errors):
> for( i = 0, j = MAX; i <= j; ++i, --j )
>
> This shows some of the stupid uses of the comma operator:
> http://stackoverflow.com/questions/54142/c-comma-operator
>

I see. I had assumed the comma operator was only valid in the "init" and 
"increment" sections of a for loop. Didn't know it was usable outside of 
that. In that case, I'd have to mostly agree. But I would hate to lose the 
ability to write a for loop such as the one you wrote above. 





More information about the Digitalmars-d mailing list