Null references

Ziad Hatahet hatahet at gmail.com
Wed Aug 22 10:37:09 PDT 2012


On Tue, Aug 21, 2012 at 4:55 AM, Regan Heath <regan at netmail.co.nz> wrote:

> Plus, I don't buy the argument that having to explicitly type ".get" will
> stop anyone from automatically coding statements like:
>
> val g: Option[T] = f.doSomething()
> g.get.doSomethingElse()
>
> and suffering the exact same null pointer exception/error despite using
> Option and boxing into a Not-Null type.
>
>
> R
>
>
C++ and D have language constructs to allow you to cast away const-ness and
immutability, does that mean we have to do away with the concept just
because there is a way around it?


--
Ziad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120822/26cb4691/attachment.html>


More information about the Digitalmars-d mailing list