Why typedef's shouldn't have been removed :(

Mehrdad wfunction at hotmail.com
Fri May 11 12:21:48 PDT 2012


On Friday, 11 May 2012 at 19:04:52 UTC, Steven Schveighoffer 
wrote:
> This is a frequent problem with null.  Since null is its own 
> type now, it doesn't play nice with custom types, only builtins 
> enjoy special treatment for null.

It is????? O_________O
(welcome to Python, lol...)

> probably something like opBool:
>
> struct S
> {
>   int x;
>   static S opNull() { return S(0);}
> }
>
> S s = null; // equivalent to S(0);

Ohhmmmmmmmmmmmm interesting, lemme look at that... thanks


More information about the Digitalmars-d mailing list