|
|
|
|
|
by steveklabnik
4042 days ago
|
|
> Nim is as safe as any other language. With regards to memory safety, it is not. https://news.ycombinator.com/item?id=9050999 is an old comment from Patrick, but in today's Nim, it segfaults in both release and development modes for me. Rust's guaranteed memory safety means that Rust code (without explicit unsafe, the vast vast majority of code) cannot segfault. > I don't understand why people think that Nim is "terribly unsafe" when in reality it's like any other language For example, unless I write a bad cext, I cannot get Ruby to segfault. None of this makes Nim a bad language. All languages have tradeoffs. |
|
EDIT: Also, Nim is planning on turning those segfaults into runtime NilErrors and a nilChecks flag that will check for them at compile time, you can also avoid this by annotating Pointers with `not nil`