r/csharp • • Jun 27 '16

Null reference exceptions hell

http://dobegin.com/npe-hell/
0 Upvotes

12 comments sorted by

View all comments

2

u/oftheterra Jun 27 '16

Ok, so rather than just snarkily commenting - "yup, null pointers exists..." which was my first thought, I'll instead recommend this:

  • Explain in your intro the purpose of the blog entry - at first glance it seems like you are just stating "null pointers exists in most modern languages" which pretty much any programmer already knows

  • Line up in the intro what a reader can expect to see - starting with examples/comparisons of how they look and function between languages, then ways to mitigate them, and perhaps a section on how languages which don't use them work

  • Expand a little bit more on the solutions section - maybe pointing towards things such as "Gaurd" libraries or Code Contracts

1

u/battlmonstr Jun 28 '16

I appreciate that. I should convey the point better in the beginning. My main point however was that our compilers should be better at fixing this problem instead of leaving it sensitive to human errors. There is though a chapter about mitigation solutions that I propose. Mentioning code contracts is a good idea.