Optional<T> equivalent in D?

Jacek Furmankiewicz jacek99 at gmail.com
Fri Nov 15 14:39:38 PST 2013


Many other languages are starting to frown on returning null 
values from methods (due to NullPointerException risks, etc) and 
wrapping them instead in an Optional<T> like in

Scala:
http://blog.danielwellman.com/2008/03/using-scalas-op.html

Google Guava for Java: (now rolled into the base JDK for Java 8):
https://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained

Is there a similar approach in D? Or maybe an equivalent is in a 
commonly used external library?


More information about the Digitalmars-d-learn mailing list