I dont said C# is better, just missing some preferred stuffs from other languages. `.?` from C# is same thing as message passing in ObjC. (You can send message to invalid object without accessing null pointer). And I miss that stuff in D.

Maybe will create a new instance of T if T is null, right?

class Responder {
Responder m_parent;


void SetSomething(int a) {
m_parent.maybe.SetSomething(a);
}
}

So, this example will ends in infinite loop.
But I don't want to call SetSomething on m_parent if m_parent is null.

Reply via email to