http://forum.dlang.org/post/atxyappczlyvqyalv...@forum.dlang.org
On Wednesday, 14 September 2016 at 18:36:46 UTC, Jonathan M Davis
wrote:
If you don't want to have problems with dereferencing null
pointers or references, then check for null in the cases where
a pointer or reference might be null.
- Jonathan M Davis
Writing your functions that disallow nul
On Wednesday, September 14, 2016 16:52:19 Bauss via Digitalmars-d wrote:
> Can someone riddle me this, why D gives an access violation
> instead of ex. a null reference exception?
>
> Like let's say you have a field that's a class and you forget to
> give it a value. Now that will cause an access v
Am Wed, 14 Sep 2016 16:52:19 +
schrieb Bauss :
> Can someone riddle me this, why D gives an access violation
> instead of ex. a null reference exception?
Access violations cost exactly 0. Noone needs to do anything
extra for this check that isn't done by the CPU already. The
next step is an