4 ms·
> 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
by hnarn 5y ago
> 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.
- zild3d 5y agoyeah maybe it safely deletes all your tables at midnight
- deleted 5y ago[deleted]
- politician 5y agoThe “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.
- remram 5y ago"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.
- politician 5y agoThese 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.
- montanalow 5y agoWhen 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.