3 ms·
I’ll be a bit pedantic and say, that even by the Swift (or rust) language: 1. Crashes aren’t unsafe. They’re actually preferable for both Swift and rust than g
by dagmx 3y ago
I’ll be a bit pedantic and say, that even by the Swift (or rust) language:
1. Crashes aren’t unsafe. They’re actually preferable for both Swift and rust than getting into an unsafe state with incorrect data. So in that sense, crashes are the seen as safe, just undesirable as an outcome.
2. Memory leaks can’t be unsafe any more than a badly optimized algorithm.
But yes, they’re sloppy and should be avoided. I just contend that there’s no real case where I think they should be considered unsafe from the model of a programming language.
They might be unsafe from the model of a context specific use. E.g you wouldn’t want a memory leak locking up your system in vehicular automation. But I’d fall back to it just being sloppy programming if that state is achieved.