Daniel Murphy, el 16 de noviembre a las 10:10 me escribiste: > "Per �ngstr�m" <[email protected]> wrote in message > news:[email protected]... > > return s || "default"; > > I think allowing the second expression in the ternary operator to be omitted > would be a better fit for D, and provide the same function. > > ie. > auto x = a ? a : b; > auto x = a ? : b; > > I think bearophile might have already proposed this?
Yes, the "elvis operator" ?: -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Sometimes I think the sure sign that life exists elsewhere in the universe Is that that none of them tried to contact us
