3 ms·
> I don't quite understand the pushback against memory safe languages As far as i read on HN, the only memory safe language discused on HN is rust and mostly w
by hulitu 1y ago
> I don't quite understand the pushback against memory safe languages
As far as i read on HN, the only memory safe language discused on HN is rust and mostly with childish pro arguments.
- zozbot234 1y agoJava and C# are memory safe languages, as are common interpreted languages like Python and Ruby. Even JavaScript is memory safe, barring the possibility of subtle JIT bugs that may practically impact such safety.
- kaoD 1y agoBut op means memory and data safe, without a GC nor a runtime, so it can be used as a systems programming language. For "some reason" people only talk about Rust in this space!
- zozbot234 1y agoSwift is also memory safe in that sense.
- JuniperMesos 1y agoThere are currently no widely-used programming languages other than Rust that offer the memory safety guarantees Rust has without a garbage collector. I think this is bad, and I wish more people would develop memory-safe systems languages that explore other parts of the design space like Rust does. But in the meantime, Rust is pretty good, certainly preferable to C or C++.
- egorfine 1y agoEven modern C++ is memory safe when used properly.
- ameliaquining 1y agoBy that definition, all languages are "memory safe when used properly".
- egorfine 1y agoWell. Yes. Lol
- modulared 1y agoThat doesn't really make sense since memory safety is a property of a language. You can have code that is unsafe (read unsound), but that is a separate issue. For a language to be memory safe it means there must be no way to mishandle a function or use some object wrong that would result in an "unsafe" operation (for Rust, that means undefined behavior). That is to say the default is safe, and you are given an escape hatch. While in something like c/c++ the default is unsafe. I'd also like to add that program correctness is another separate concept from language safety and code safety, since you could be using an unsafe language writing unsafe ub code and still have a correct binary.