Smart pointers instead of GC?

Timon Gehr timon.gehr at gmx.ch
Sun Feb 2 09:55:53 PST 2014


On 02/02/2014 05:55 PM, Andrei Alexandrescu wrote:
>
> I think of the following foci for the first half of 2014:
>
> 1. Add @nullable and provide a -nullable compiler flag to verify it. The
> attribute is inferred locally and for white-box functions (lambdas,
> templates), and required as annotation otherwise. References not
> annotated with @nullable are statically enforced to never be null.

- I assume that also, references annotated with @nullable are statically 
enforced to never be dereferenced?

- how to eg. create an array of nullable references? struct Nullable!T{ 
@nullable T t; alias t this; } Nullable!T[] foo; ? I think that would 
cause problems with IFTI.


More information about the Digitalmars-d mailing list