I’ve finally gotten around to implementing the
null literal. Here’s my current plan. Feedback would be much appreciated.
nullis specified in a context that expects a pointer of any kind, that pointer type is returned by the literal.
nullis specified with no expected type, or with an expected type that is not a pointer, compilation error will happen.
- Avoids C++ somewhat awkward
- Too simple?
- Doesn’t allow user-defined types to accept a generic
Please let me know what you think.