On Thursday, 5 June 2014 at 09:43:13 UTC, Jonathan M Davis via Digitalmars-d-announce wrote:
if(cond)
    var = "hello world";
else
    var = 42;


I've sometimes wished for this functionality. It's not even a big deal in a statically typed language with built-in algebraic types and flow-based typing. The type of var is just String|Integer, and you have to disambiguate before you use its value.

Reply via email to