|
|
|
|
|
by pcwalton
4145 days ago
|
|
> That said, clang has lots of options to tame C's undefined behaviour. Guess what, you can enable these too for C code generated by Nim. They aren't really designed for performance though. For example, `-fsanitize-undefined-trap-on-error -fsanitize=null` emits explicit comparisons against null for every pointer load instead of catching SEGV like (for example) Java or Go do. From what you're saying it sounds like maximum performance plus memory safety isn't a design goal for Nim. That's totally reasonable. It does mean that Nim and Rust have very different aims, however, and comparisons between the two need to take this into account. |
|