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

> a grep that fails to find `unsafe` in a rust code base lets me know that this code is in fact pretty safe

This statement does not make any sense. That, or we have vastly different definitions of what “safe” means.




When you remove the context around statements (thread about rust concurrency), it's easy to make a statement into overblown nonsense. You may be interested in the broader analysis contained in the link from parent comment, about the type of safety being discussed in this thread, or you may not.


yeah maybe it safely deletes all your tables at midnight


The “unsafe” keyword in Rust is a source of perpetual oblivious overconfidence. It should’ve been called something that befits it’s actual narrow scope (`disableStongTypeChecks` or some such) but that ship has sailed.


"unsafe" is pretty clear: the block/function is not safe, that doesn't mean the rest is safe. I suppose it might have been better named as "asserted", "assumed_safe", or "manually_checked", but that's much more verbose and not necessarily clearer.


These blocks are supposed to be rare, so a more verbose keyword isn't a problem. It would be better to be precise here and avoid a concept so general as safety.




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

Search: