On 12/07/2012 19:32, Andrei Alexandrescu wrote:
On 7/12/12 12:24 PM, Daniel Murphy wrote:
"Jonas Drewsen"<jdrew...@nospam.com> wrote in message
news:zwtvliaunccmtwmab...@forum.dlang.org...
auto a = foo ?? new Foo();
is short for:
auto a = foo is null ? new Foo() : foo;
/Jonas
Yeah, I've been planning to try and get this into D one day. Probably
something like:
(a ?: b) -> (auto __tmp = a, __tmp ? __tmp : b)
gcc used to have that extension and they dropped it...
Andrei
Do you know why ? It have been useful to me in languages that support it.