Hacker News new | past | comments | ask | show | jobs | submit login

There technically is an "unsafe" mode, but not in the way you're thinking. You can drop down to C level by writing code in unsafe blocks and using methods prefixed with "unsafe." This will stop the compiler from doing things like inserting bounds checking and should perform fairly close to Clang.

Generally though, rust strives for the same ideal as C++: you only get what you pay for. You can carve out the subsection of the language you need through things like feature gating without too much trouble right now (and the standard library is still improving in this regard).




Just a quick reply to link to this answer on reddit with the question:

Does 'unsafe' disable array bound checking? http://www.reddit.com/r/rust/comments/2aqqxa/does_unsafe_dis...


Oh, the open door to security exploits that C developers love so much.

When Hoare designed Algol(1960) he was explicitly requested not to allow it, due to security concerns[0].

[0] "The 1980 ACM Turing Award Lecture",




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: