I feel like most people defending C++ resort to “people shouldn’t use those features that way”. 😅
And yeah, I’m with you, that’s a shit argument. A language is a tool, it exists to make the task easier. If it makes it harder by leading you into situations that introduce subtle bugs, that’s not a good tool. Or at least, worse than an otherwise similar one that wouldn’t.
Without a super-detailed knowledge of the history and the alternative languages to go off of, my suspicion is that being unsafe is intrinsic to making a powerful mid-level language. Rust itself doesn’t solve the problem exactly, but does control flow analysis to prove memory safety in (restricted cases of) an otherwise unsafe situation. Every other language I’m aware of either has some form of a garbage collector at runtime or potential memory issues.
And yeah, I’m with you, that’s a shit argument. A language is a tool, it exists to make the task easier. If it makes it harder by leading you into situations that introduce subtle bugs, that’s not a good tool. Or at least, worse than an otherwise similar one that wouldn’t.
Without a super-detailed knowledge of the history and the alternative languages to go off of, my suspicion is that being unsafe is intrinsic to making a powerful mid-level language. Rust itself doesn’t solve the problem exactly, but does control flow analysis to prove memory safety in (restricted cases of) an otherwise unsafe situation. Every other language I’m aware of either has some form of a garbage collector at runtime or potential memory issues.