`not nil` enforces compile-time checks which provides stronger guarantees. I'd 
say it's a first step towards Nim proving formal properties of a language.

For example when interfacing with low-level pointer based API, you might want 
to say return a `ptr T not nil` from malloc (because if it was nil it would 
have been an OutOfMemory error) and the rest of the program can rely on that 
property as it's propagated and compile-time check by the compiler.

Reply via email to