Restricting ++ and --

Vladimir Panteleev thecybershadow at gmail.com
Sun Oct 25 04:07:23 PDT 2009


On Sun, 25 Oct 2009 12:33:13 +0200, bearophile <bearophileHUGS at lycos.com>  
wrote:

> - Make them return void, so they can't be used as expressions like this:
> y = x++;
> foo(x--);
> You have to use them as:
> x++; y = x;
> x--; foo(x);
> (So ++ and -- become similar to the Inc() and Dec() functions of Pascal).

No way. I've written items[itemCount++] way too often to give that up.

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list