Interview at Lang.NEXT

Meta via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jun 5 06:26:48 PDT 2014


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.


More information about the Digitalmars-d-announce mailing list