|
|
|
|
|
by adev_
1637 days ago
|
|
> Other than memory safety, simplicity, dependency management and build tooling, the .NET standard libraries, the open source library ecosystem Not feeding the troll but outside memory safety, everything else you list exist in the C++ ecosystem with generally better alternative than in C#. And as soon as you do touch mmap , unsafe area or native code in C# you loose memory safety too anyway. |
|
Oh? I don't think you can dispute that the C standard library is very limited and the state of dependency management / build tooling is very poor. And that actually limits the usability of the open source library ecosystem quite a lot; maybe there are more C++ libraries out there, but you can't just type what you want into the nuget search bar and get on with using it.
Simplicity is in the eye of the beholder, but the very weak semantics of C++ templates mean you can't reason compositionally about C++ code, whereas in C# it's relatively easy to have a codebase that you can reliably understand piecemeal.
> And as soon as you do touch mmap , unsafe area or native code in C# you loose memory safety too anyway.
In principle yes, but if you keep those points very rare then you can subject them to extra review etc. at a level that would be impractical with a C++ codebase (where even "a + b" is undefined behaviour in the general case). Memory safety vulnerabilities in real-world C# codebases are rare.