Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would imagine it wouldn't be too hard to collect this information because you can just change the setting on a project and report back whether that's no significant difference, broken (indicating your Rust is wrong, you should fix that) a little slower or unacceptably slower.

Actually that information might help inform people choosing this setting for a new project. I think many assume that Wrapping is the conservative choice but actually the Strict / panic semantic is going to be better for at least some of those people if they could afford it and so if they knew that say 60% of projects find this works out they might try it and benefit.

As a side effect a handful of people get to find out that their project has a nasty bug where it actually relies on wrapping for routine functionality but does not correctly use a wrapping type.



Also, for what it's worth, it's easy to change, if you're building with cargo (basically everyone does)

    [profile.release]
    overflow-checks = true
There have been a few projects where I've set this for one reason or another (e.g. because I'm dealing with intentionally wrapping arithmetic and I want the program to shout if I make a mistake).




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

Search: