Hacker News new | ask | show | jobs
by MrBuddyCasino 2068 days ago
So one of the biggest improvements to my day-to-day life as a programmer was having compiler-checked nullability in Kotlin. It is the most significant feature that makes programs more reliable and code more readable compared to Java. I never want to miss it again.

Why did Nim decide to allow null pointers? They must have had a very good reason, given its young age?

4 comments

Minor correction Re: "young age" - Nim dates back to 2006 with a first public release in 2008 and is older than Go and Go is older than Kotlin.
You need null pointers for system programming.

That said you can already declare `type MyPtr = ptr int not nil` but the compiler is still clunky on proofs and needs a lot of help.

it is planned to have a much better prover in the future and ultimately Z3 integration for such safety features: https://nim-lang.org/docs/drnim.html

nil checking is being worked on : it might be a part of 1.6
Interop I imagine.