[D typesystem] What is the type of null?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 12 08:04:52 PDT 2010


On 10/12/10 9:51 CDT, Adam D. Ruppe wrote:
> I agree with what the compiler says: void*.
>
> null is literally a pointer into the void - there's nothing there
> for it to point to.

Problem:

char[] a = null;

The answer to the OP's question is simple: null's type is not 
expressible in D.


Andrei


More information about the Digitalmars-d mailing list