6 ms·
Why does every single rust promoting article have to bash on c++? They built a GC, good job. But, surely there is something else more worthy of typing about wh
by quickben 8y ago
Why does every single rust promoting article have to bash on c++?
They built a GC, good job. But, surely there is something else more worthy of typing about when hyping the language?
- rapsey 8y ago> Why does every single rust promoting article have to bash on c++? Because it was built to be a C/C++ replacement. > They built a GC, good job. ?
- banachtarski 8y agoTo me, it feels like Rust really only has value to people who aren't already using C++14/17. The incremental benefit in certain areas is small, and it steps backwards in other areas.
- MrBuddyCasino 8y agoMaybe I'm living in a special kind of bubble, but I have yet to meet a C++ programmer IRL who doesn't hate it.
- pjmlp 8y agoHello, now you know me. I leave that special spot for C.
- Ygg2 8y agoSay what you want about C, but at least it doesn't require reading several LotR length books, to be up to date with all the stuff. Sadly, Rust, seems to be getting a few tomes of its own as well :P
- pjmlp 8y agoActually it does, for anyone that cares about how to write portable and safe code in C. There is this myth that C is a simple language, when devs stick to a single OS/compiler combo.
- Ygg2 8y agoC is a simple language. It has order of magnitude less concepts than C++. It's application is complex. In same way Lisp is a simple language, but its application can be just as complex.
- banachtarski 8y agoThere are dozens of us. Dozens! You need to search for programmers that have problems in the microsecond to millisecond scale.
- exceptione 8y ago«The incremental benefit in certain areas is small, and it steps backwards in other areas.» As someone who doesn't know about C++ and Rust, can you elaborate on that?
- pjmlp 8y agoRust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers. C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ... For example AUTOSAR just recently moved away from C to C++14 as suggested language for car computer systems, imagine how long it will take for them to suggest other language.
- rapsey 8y agoYou did not list any steps backwards just that the ecosystem is less mature
- pjmlp 8y agoSure I did, lack of SIMD and GPGPU support for example. If you prefer to be more specific, generics in Rust are still not as powerful as in C++, lacking const parameters and HKT, although they are coming. Also compile time code execution is not yet supported, although quite a bit can be achieved with macros.
- steveklabnik 8y agoAssuming nothing catastrophic happens in the next five days, https://github.com/rust-lang/rust/pull/49664 https://github.com/rust-lang/rust/pull/49664 can be merged, by the way. So that'll be one thing off your list as of 1.27.
- RazrFalcon 8y agoSo nothing about ADT, pattern matching, modules, better std, explicit unsafe and cargo?
- sidlls 8y ago> Because it was built to be a C/C++ replacement. That doesn't mean discussions including it have to bash C or C++. In fact, there is supposedly a very high standard in the official Rust community against bashing other languages. Plenty of languages have completely replaced or circumvented C and C++ (i.e., out-competed them) in their respective niches without it being a heated two-minutes hate every time discussions come up.
- stevedonovan 8y agoI approve whole-heartedly of the "no zealotry" rule. (I seriously doubt that the Jehovah's Witnesses have achieved conversion rates commensurate with the effort expended.) That being said, C has problems, particularly the assumption of the "sufficiently smart programmer". Because I'm not smart enough, I appreciate the nagging of the Rust borrow checker, although to be honest it is a complete pain at first.
- rapsey 8y ago> That doesn't mean discussions including it have to bash C or C++. One mans critique is another mans bashing. Though admittedly I did not really read the article.
- oddity 8y agoRust finally provides an alternative to C++ in one of the few niches that still mandated C/C++, and now that there is an alternative, it's easy for people to get carried away with evangelism.
- stevedonovan 8y agoI'm obviously a fan, but evangelism does not sit easily with engineering. Can alienate outsiders, and pump up a positive bubble in which sound criticism might be neglected. (In fact, /r/rust has a 'no zealotry' rule.) This submission was not my idea, even though I'm not _too_ embarrassed.
- travv0 8y agoWho built a GC?
- pjmlp 8y agoManishearth did, as an experiment. :) https://github.com/Manishearth/rust-gc https://github.com/Manishearth/rust-gc