On Sunday, 26 May 2013 at 06:12:55 UTC, Walter Bright wrote:
On 5/25/2013 10:58 PM, deadalnix wrote:
Most ICE in DMD are cause by assert fail on null pointers.
Even if that were true (and it isn't), it doesn't follow that
having non-nullable pointers would have magically prevented
them.
It would have enforced at compile time that all cases are handled.
Practically none of them were "oops, I forgot to initialize the
pointer", which you'll see if you examine the corresponding
pull requests to fix them.
The symptom and the cause are two entirely different things.
You cannot fix jaundice with makeup.
True, it is simply the consequence of some rare code path that
aren't defined properly and as they are rare, don't show up in
testing. Statically enforcing null checking would make theses
path apparent, and force the developer to consider them.
It obviously won't provide a solution out of the box to apply.
Simply make all issues explicit.