Should we deprecate comma?
Regan Heath
regan at netmail.co.nz
Mon Mar 24 03:52:46 PDT 2014
On Mon, 24 Mar 2014 02:50:17 -0000, Adam D. Ruppe
<destructionator at gmail.com> wrote:
> int a = something == 1 ? 1
> : something == 2 ? 2
> : (assert(0), 0);
FWIW I personally find this kind of code horrid. I would re-write to:
assert (something == 1 || something == 2);
int a = (something == 1 || something == 2) ? something : 0;
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list