Skip to content

Comment on Too dangerous for C++parent

Comments

Do you have an example of C++ being safer than unsafe Rust?

As to C# being safer, wouldn’t your comparison need you to take into account unsafe constructs used to implement the C# VM?

an example of C++ being safer than unsafe Rust?

Not really, that’s just my impression reading stuff about unsafe rust, and programming C++.

wouldn’t your comparison need you to take into account unsafe constructs used to implement the C# VM?

Rust compiler depends on LLVM written in C++, kernels for all mainstream OSes are written in C. The probability of bugs in my code I just written is orders of magnitude higher than probability of bugs in these third-party systems.

Rust compiler depends on LLVM written in C++, kernels for all mainstream OSes are written in C.

But this general criticism is just as valid for C# which you say is safer, isn't it? 18.6% of the C# runtime is written in C or C++[1] and you run the runtime on an OS that's largely written in C or C++.

[1] https://github.com/dotnet/runtime

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.