3 ms·
> Managed scripting languages you mean No. I mean what I wrote. > C++ is quite high level and managed languages like Swift, D and C# offer similar concepts.
by masklinn 6y ago
> Managed scripting languages you mean
No. I mean what I wrote.
> C++ is quite high level and managed languages like Swift, D and C# offer similar concepts.
Languages like Swift and C# have memory safety and automated memory management by default, unlike C++. They also don't have C++'s unique blend of language features mis-interacting with one another in rather deadly way.
- pjmlp 6y agoJust because C++ is unsafe by default that doesn't make it less high level. Languages like Swift and C#, or even Rust, while safe by default do also have their gotchas, do expose unsafe code capabilities, and when an application crashes or panics in the middle of a critical workflow, it is deadly no matter how it came to happen. Specially deadly in the age of thin runtime libraries, that requiring installing half of the Internet for each basic dependency, without any sort of control quality. For example, Rust libraries that make use of unsafe just because the authors gave up on writing the code in a proper way, but n levels deep on the whole dependency chain.
- AstralStorm 6y agoStill, it makes testing and finding bugs much easier, because you can relatively easily ensure correctness of the safe part of code, and unsafe parts get visible. It's not as potent as say Isabelle/HOL prover or top of SML or SPARK Ada, but much easier to write, and safer than Java at memory management in practice. (Where you get to write very thick foreign interfaces with no way to even try to make them safer, and cannot control memory allocation manually easily.) A decent balance.