On Friday, 11 May 2012 at 20:14:29 UTC, Andrej Mitrovic wrote:
On 5/11/12, Steven Schveighoffer <schvei...@yahoo.com> wrote:
Since null is its own type now..
What were the use-cases for making it a type? Seems odd to
declare it:
typeof(null) x;
I mean what could you do with such a type?
It apparently implicitly converts to any pointer type (but you
must cast in order to store in it...)
-=-=-
import std.stdio, std.conv;
void main() {
typeof(null) x;
int y = 5;
x = cast(typeof(null)) &y;
int * z = x;
double * d = x; // wat
writeln(*z);
writeln(*d);
}
-=-=-