Re:Nim binary size from 160 KB to 150 Bytes
by filwit on Monday May 04, 2015 @01:55PM
(#9487802)
You prove to the compiler that the nilable var is not-nil via if statement. Eg:
[ Parent
| on HN ]
Ah, good to know. So Nim does static analysis on conditionals where Rust would use an explicit pattern match to get at the contained value.
Might be a good example for http://nim-lang.org/manual.html#not-nil-annotation