zlacker

[return to "“Rust is safe” is not some kind of absolute guarantee of code safety"]
1. tcfhgj+w4[view] [source] 2022-10-02 14:53:29
>>rvz+(OP)
> Not completing the operation at all, is not really any better than getting the wrong answer, it's only more debuggable.

Wouldn't be that sure about that. Getting the wrong answer can be a serious security problem. Not completing the operation... well, it is not good, but that's it.

◧◩
2. atoav+35[view] [source] 2022-10-02 14:56:26
>>tcfhgj+w4
I mean if it is a cosmetic thing sure. If it has substantial meaning I would rather have that 5 ton robotic welding arm not move than have it move through my skill.

It is sometimes acceptable to get wrong output. But is nearly always better to know it is wrong.

◧◩◪
3. fritol+ya[view] [source] 2022-10-02 15:27:59
>>atoav+35
Unless it was holding a welding gun and stopped on one spot with the welding flame turned on instead of gracefully turning off the flame and backing away.

Never used Rust before but is there a way to supply some default code to run in such a situation instead of just not carrying out the bad operation?

[go to top]