On Friday, 10 August 2018 at 12:42:37 UTC, Nicholas Wilson wrote:
meant is(typeof(*null) == typeof(assert(0)))
How is that a good thing??? Also that is not specified in the
dip. I would expect that to fail because both will produce
error nodes in the AST, only assert(0) is considered special
under this DIP.
Granted, an example like that should be described so we know
better what he means with the possible future uses.
The benefit would be that null can be a regular pointer constant
(enum null = typeof(&assert(false)).init) instead of a symbol
with special meaning. I'd think it makes compiler rules less
Another advantage is that you could pass null as an argument for
a function template which wants to know it's element type (but of
course not instantiate it) like any other pointer.