8 ms·
IMO, this is because there's a general attitude about porting to Rust that porting to Rust, by itself, makes a material improvement in the quality of the softwa
by dfabulich 8y ago
IMO, this is because there's a general attitude about porting to Rust that porting to Rust, by itself, makes a material improvement in the quality of the software (e.g. reliability, performance, readability), and that these improvements that can't be achieved in C/C++. Entrenched C developers then rise to the debate to defend their language.
This debate has happened often enough that any time someone ports something to Rust, even if it's just for fun or for the author to learn more Rust, C/C++ advocates see it as an attack on their language, and bite back.
- deleted 8y ago[deleted]
- test6554 8y ago...hey everyone, I made a C/C++ developer blood pressure checker in Rust.
- diegoperini 8y agoYour entire program should be wrapped by unsafe{}.
- jordigh 8y agoThe only attack I feel is calling C/C++ a language. It's two languages and we don't like each other very much. People who spend a lot of time trying to write good C++ avoid much of C's bread and butter like malloc and free, and the general hatred of C++ from C developers is well-documented. I happen to prefer C++ to C and D to both.
- guessmyname 8y agoI have never treated "C/C++" as the name of a single language. I always read it as "C and/or C++".
- mortdeus 8y agoYou can consider them the same in the sense that they are the guys with the biggest cocks on the block.
- jordigh 8y agoThey are so often spoken of in the same breath in ways that other languages are not, that I think a lot of people do forget that they are not the same thing nor even that culturally close.
- noobermin 8y agoGoing to be honest, whenever I see or hear someone put them in the same category, it usually colors my impression of said person as essentially never really learning C++.
- deleted 8y ago[deleted]
- novembermike 8y agoEh, I'd call them culturally close. I always read it as "the most common systems programming languages", since that's how the phrasing is usually used.
- jordigh 8y agoEven that can be disputed. They typically have quite different domains of applications. Gamedev is seldom done in C; operating systems are seldom done in C++. Their different level of abstraction ends up having them applied to different things.
- scoggs 8y agoI would assume a lot of recruiter-types or folks just getting their feet wet into programming would assume C++ is just a newer or more powerful "Edition" / "Version" of C.
- euyyn 8y ago> we don't like each other very much Hi are you a language?
- zeth___ 8y agoJavascript runs everywhere where there is a browser. Rust runs everywhere where there is a c compiler, which is funnily enough the sample places that C/C++ run.
- bluejekyll 8y agoAnd with wasm, Rust/C/C++ all can run in the browser too...
- zeth___ 8y agoNot quite yet. But getting there.
- bluejekyll 8y agopretty much there: https://www.hellorust.com/setup/wasm-target/ https://www.hellorust.com/setup/wasm-target/
- fineline 8y agoJS in the browser has direct integration to the DOM, networking, various local data persistence APIs, and other IO and sensors (webcam, accelerometer...) etc. Rust can be compiled to run in a sandbox, which can then be integrated via a remote call interface with the JS layer, and thus be indirectly (via JS) connected to the above APIs, but there are currently concerns around the performance of this approach. Rust cannot independently manage a web page which hosts it, without JS. There is some way to go before browsers support practical, accessible and performant front-end web apps in Rust.
- erikpukinskis 8y agoWhen people say “The Browser” they mean “that thing which is on literally every computer where you instantly load that one kind of software”. People think the web is a technology, or that JavaScript is a language. They’re not. It’s not. The web is an idea: it’s the idea that every computer in the world already has the runtime on it that can run your next app. Whatever that is—whatever that runtime is—that’s “The Browser”. WASM is not that. Maybe in 10 years.
- sidlls 8y agoI think you're eliding a lot of context here. Specifically the context of overzealous Rust fans. There's a strong, though not universal or even majority sentiment that "writing anything in C or C++ is basically the same as committing assault, murder, professional malpractice or other similar hyperbolic claim" that some Rust advocates engage in. There's a whole meme about the "Rust Evangelism Strikeforce" on n-gate.com for a reason, and that reason is the community on HN has become a caricature of itself. By the way, this is from a person who made a point to introduce Rust to the team, when even just a year or so ago I'd have preferred C++.
- theprotocol 8y ago>eliding Incidentally, I learned this word from Rust docs (lifetime elision). I'd never seen it in any other context.
- tubs 8y agoTo provide some supporting evidence for this, a choice comment made a couple of days ago: > Rust has many benefits and I find it hard to imagine how anyone manages to get any performance-sensitive work done in the cryptocurrency industry with anything else.
- sidlls 8y agoI've seen every single thing I mentioned ("murder, assault, malpractice") applied to C++ programming in comments in Rust threads.
- deleted 8y ago[deleted]
- MikkoFinell 8y agoPeople are actually claiming that Rust is more readable than C?
- Ericson2314 8y agoForrest vs trees..... Sigh
- littlestymaar 8y agoIt depends what you call “readable” I guess, if you think it as : “I can have a glance at this code and feel comfortable”, then obviously C is more readable than Rust, because Rust has a quite a few specific syntaxes that will feel alien to anyone not accustomed. But I'm not sure this metric is relevant. And on the other hand, if you call “readable” the ability of someone knowing the language to get on board of an existing project, understanding the control flows and feeling confident to make changes, then Rust wins easily because the type system gives you all the information you need straight in front of you. The first time I had a look at Servo[1], I was able to change what I wanted (which were quite a lot of thing: a few dozens of lines in something like 5 or 6 different files) in a few hours. And when I compiled it it worked fine. Good luck doing the same with a C project you just discovered. And I wasn't even a professional Rust programmer at that time. [1] the experimental browser engine form Mozilla
- MikkoFinell 8y agoWhich information in particular is missing from the C type system in your opinion?
- weberc2 8y agoFor better or worse, Rust has a lot more built into its type system, including semantics for type safe generics and safe memory management. This makes it harder to write a correct Rust program, but also it makes it harder to write an _incorrect_ Rust program.
- littlestymaar 8y ago
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]