Re:Go channels, goroutines and GC available in Nim
by jessaustin on Monday June 01, 2015 @09:38PM
(#9643322)
Sorry for my ignorance, but the languages other than C that I've used are javascript, python, various lisps, bash, sql, prolog, etc.: no pointers! I'm interested to learn how pointers might be made safe, in Nim or anywhere else?
[ Parent
| on HN ]
Re:Go channels, goroutines and GC available in Nim
by Pharohbot on Monday June 01, 2015 @09:55PM
(#9643372)
It really depends on how you define "safe". Nim will allow you to deref null pointers (unless you annotate it with `not nil`, then it can never be nil, this results in compile errors if it is) but if they are, it will be like Java and throw an exception if --nilChecks:On. The only language I know that makes pointers safe is Rust, with it's borrow checker and such, but that's a tradeoff I don't really want and the options Nim provides are better for my case.