Earlier quoted context omitted.
The entire JIT, garbage collector and most of the C#'s VM are all implemented in C++. This has caused various issues in the past which are exploitable from managed code. The amount of unsafe code used to implement C# vastly outweighs the amount in Rust's standard library.
If you are going that way, Rust's reference compiler is dependent on LLVM, fully written in C++, and the C++ semantics of bitcode have broken Rust's code generation multiple times, forcing regressions and newer compiler releases with desactivated optimization features. Also plenty of crates are bindings to C and C++ libraries with nice unsafe blocks. Then was that Axium drama.
OpenD, a D language fork that is open to your contributions
311–320 of 322 posts
Re: OpenD, a D language fork that is open to your contributions
#312Earlier quoted context omitted.
If you are going that way, Rust's reference compiler is dependent on LLVM, fully written in C++, and the C++ semantics of bitcode have broken Rust's code generation multiple times, forcing regressions and newer compiler releases with desactivated optimization features. Also plenty of crates are bindings to C and C++ libraries with nice unsafe blocks. Then was that Axium drama.
Hmm? Dotnet on Linux uses LLVM for codegen so that seems to be a wash. Lots of nuget packages are wrappers around native libraries as well.
The point is the "look at what I say, not what I do", when talking about safe languages and dependencies into C and C++ libraries and compiler toolchains.
Re: OpenD, a D language fork that is open to your contributions
#313Earlier quoted context omitted.
Hmm? Dotnet on Linux uses LLVM for codegen so that seems to be a wash. Lots of nuget packages are wrappers around native libraries as well.
Yeah, doesn't make Rust's dependency on C++ go away for its safety. The point is the "look at what I say, not what I do", when talking about safe languages and dependencies into C and C++ libraries and compiler toolchains.
Re: OpenD, a D language fork that is open to your contributions
#314Earlier quoted context omitted.
Nonsense, WG21 is committed to ensuring C++ has more warts and sharp edges than any other language on the planet.
I don't agree. Rust very much wants to be a C++ alternative in all (I mean all) respects.
Re: OpenD, a D language fork that is open to your contributions
#315Earlier quoted context omitted.
Yeah, doesn't make Rust's dependency on C++ go away for its safety. The point is the "look at what I say, not what I do", when talking about safe languages and dependencies into C and C++ libraries and compiler toolchains.
Which doesn't really have anything to do with GP's incorrect assertion that C# is somehow safer than Rust.
When Rust gets fully bootstrapped in self hosted toolchain you'll have a point.
Re: OpenD, a D language fork that is open to your contributions
#316Earlier quoted context omitted.
I should take this to the security team although I have a hunch that they'll think I am full of shit. What with the CVE count never going down with asan, ubsan, tsan and all kinds of guidelines, analyzers, tests and what not.
Hungarian notation has never been proven to reduce errors compared to strong types, and the CppCoreGuidelines tell you not to use it. clang-tidy can largely automate Hungarian notation, at least.
Re: OpenD, a D language fork that is open to your contributions
#317Earlier quoted context omitted.
Rust syntax isn’t really that novel. It’s not exactly like C, but most of its syntax is pulled from some popular language: some from C, some from JS, some from Python, some from ruby, etc.
A lot more from ocaml than js/Python/ruby.
Re: OpenD, a D language fork that is open to your contributions
#318Earlier quoted context omitted.
Which doesn't really have anything to do with GP's incorrect assertion that C# is somehow safer than Rust.
It has to do with yours incorrect assertion that using C++ in the runtime is a disadvantage for C# in regards to Rust, which equally depends on C++, in both of its compilers toolchains, rustc and gcc-rs. When Rust gets fully bootstrapped in self hosted toolchain you'll have a point.
Re: OpenD, a D language fork that is open to your contributions
#319Re: OpenD, a D language fork that is open to your contributions
#320Earlier quoted context omitted.
It might not help you today with your immediate problem but think about it this way: You become the boss or responsible for some product. If you decide at the beginning to start off using Rust or rewrite some ancient, unmaintained library using Rust, then you prevent people like your cowboy developer to mess stuff up with this category of faults. Either you would not hire him in the first place because he never came…
If the cowboy developer is the boss they can still just wrap everything in unsafe blocks. But I think I'd take that over the C++ new/delete/malloc/free salad.
Some rather "questionable" C/C++ code can, and are missed during code review sessions. One could put the blame on code reviewers, but let's be honest, code reviewing is a mindnumbing task for many of us.