Null references redux

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed Sep 30 12:55:03 PDT 2009


On Wed, Sep 30, 2009 at 3:30 PM, Denis Koroskin <2korden at gmail.com> wrote:

> Note that C stdlib (and other libraries/bindings) will need to be updated to
> reflect changes, e.g.
>
> extern(C) void*? malloc(size_t size); // may return null!
>
> which is great because it will provide additional safety. I've seen quite a
> lot of code that don't test returned value against null (which is a mistake,
> I believe).

Wonderful. Don't you love self-documenting code that forces you to use
it correctly? :P



More information about the Digitalmars-d mailing list