Any legit criticisms of Rust vs C/C++? I learned C++ when I was in high school 17 years ago. I had a lot of fun using it to do some great stuff. However, in the modern age, it would seem that Rust is purpose built for parallelization, memory safety, and low level performance - basically everything you want in a modern implementation of a powerful, low-level language.
I can definitely see why Rust would be a great asset in the software world right now. Egotistical C/C++ devs like to think they're above it and have good practices to avoid memory leaks and other memory-unsafe practices, but the stats show otherwise. Besides pride, what legit, technical,game-stopping criticisms are there of Rust that mean we couldn't just adopt it as the new standard for low-level, performance-oriented programming?
>what legit, technical,game-stopping criticisms are there of Rust that mean we couldn't just adopt it as the new standard for low-level, performance-oriented programming?
Rust doesn't the technical legacy of C++. Thats it.
On a pure language based level, Rust is better than C++ in everyway. ISOC++ is a complete shit show (look at fucking lambdas) and the only reason people continue to use it is because there are 30+ years of tooling involved, and the monkey C++ coders have deluded themselves into thinking that their kafkaesque death trap is superior and by being able to navigate that shitshow, somehow makes them superior.
My first Rust project was a reimplementation of Redis using Tokio based on the Seastar architecture. Not only was it easier to read and memory safe, but for my first project, it BTFO redis in performance. The only feature I haven't completed yet is MULTI/EXEC.
It will take time to get the large projects onto Rust, but once that happens C++ will go the way of FORTRAN.
Robert Johnson
I don't like some of the community. But that isn't a technical issue and is subjective.
I think the big thing with Rust is simply that it is new and not very mainstream. If you are going to build a big project you can easily get a ton of good java developers at a reasonable price. I'm not sure the same can be said about Rust. Additionally, it's likely you will be doing more work because of missing libraries/code in Rust, unless you are okay with having a mixed project. There are a lot of variables there.
If someone is writing a serious application they will just go with something they know works, that they know developers exist for, and they know will be maintainable for 20 years.
Justin Powell
It would seem that Rust, given only 3 years in from v.1.0, is competing very well against C++ in terms of performance.
>parallelization rust is honestly terrible for this, use erlang or go instead >low-level language neither rust or c/c++ are low-level >memory safety useful but companies with large c/c++ applications would be better served with a clang plugin that implements the borrow checker rather than rewriting the whole program
Anthony Evans
The biggest problem is that it isn't C/C++. It's a hard sell to go from C++ to Rust if it means retraining your engineers and retooling. Using a better language isn't a guarantee of a product either, the quality and experience of your team is far more important than any safety guarantees a language can provide.
Bentley Stewart
Rust is neat, I don't see it taking the industry by storm and dethroning C++ The crate system is autistic as well And sufficiently complex programs have you fighting the borrow checker to please its syntax Enabling nightly features is messy. I still like it enough that I only use Rust and Python now.
John Lee
just use python
Owen Barnes
>haskell >low performance Why does control and performance share an axis? The graphic makes no sense!
>c isn't low level There is no reaction picture in the history of the internet to convey how confused, angry, and stunned this stupidity makes me.
Chase Campbell
Where c#
Julian Brown
>use rust >be like 737 max8 ,automated, lack of control vs c
Lucas Cook
In the garbage disposal
Connor Lee
Rust programs take forever to compile.
t. non-rust programmer
Justin Carter
The problem with Rust is that it's a C/C++ replacement, but both C and C++ are overused. There are a lot of areas where none of these three languages should be used, but because decades have been wasted on C or C++ they kinda work sometimes. Obviously Rust doesn't, simply because it's hasn't been around long enough.
Robert Baker
Rust is permanently immature. You can't do half the shit you can do in C++ and the language has an absolute disregard for any kind of backward or forward compatibility. Rust doesn't address any of the problems with C++ such
Josiah White
This. Rust is fundamentally different from C/C++. Same reason C/C++ programmers haven't switched to Java/Haskell yet. Rust can finally rival the performance of C/C++ though, so maybe once rust becomes more stable people will start using it for applications where C/C++ is currently the only viable option. I'm still confusing or crashing the compiler frequently when trying to compile low level code.
Blake Diaz
Based
Camden Sanders
its a high level language you idiot
Colton Collins
Too much stupid propaganda and marketing (e.g. your pic), plus the team having reputation of being kucked SJW discord trannies.
Easton Reed
Rust isn't a concrete thing, it's a promise of, "Hey, trust us, goy. We're smart are will be the right thing, and you can be smart too by joining us."
I might consider using it after it's even vaguely stabilized, if there has been enough done with getting the whole ecosystem going, but why the fuck should I invest effort into a platform basically promising to break shit whenever they feel divine inspiration strikes them again and they need to bolt on eight more abstractions?
Ayden Collins
yeah fuck rust for wanting to produce a logically and theoretically sound langauge instead of just accumulating decades of broken abstractions on top of broken abstractions like C++
Elijah Cook
rust's abstractions are shit instability is worse than any of C++'s warts
Ethan Foster
No, fuck them for never shutting the fuck up for almost 10 years and delivering. You're supposed to make something great, then show it off, not promise the sun and the moon and never quite get around to delivering it. And incremental progress is dramatically less substantial and meaningful if backwards compatibility isn't promised. Using the community as a testing grounds for their random ideas then breaking existing code is just not an acceptable model for professional software developers to confidently build off of.
Ian Reed
>hello world in rust is 2.3M yeahhhh, either you establish your stdlib on all major OSes so that you don't have to statically link everything, or you're fucked also, cargo system feels a lot like those retarded javascript developers who import 1GB of libraries just to check if a number is odd ( npmjs.com/package/is-odd )
Jaxon Wood
It isn't low level though.
Jason White
>not usefulness/safety
Luke Gomez
buy a usb drive
Luke Jones
if you think being given the ability to write directly to memory addresses without restriction isn't low level, you're retarded try doing that with python and see how far that gets you
Dylan Reyes
>the ability to write directly to memory addresses without restriction C doesn't let you do that tho
Charles Bell
Rust is controlled by people who want to destroy society. Technical enough for you?
Dylan Phillips
std library is very inadequate hence you need to know many crates to get your job done. The safety constructs make it very unproductive and the BC is hellish when you try to implement tricky data structures.
Also, pointlessly jumping ship to the hipster mindset of "OOP bad!" while not providing HKT, pi-types, Rank-N types and other features that are alternative to struct inheritance.
>Rust is permanently immature. How is it permanently immature? > You can't do half the shit you can do in C++ Example? Wouldn't the same could be said about C++? Standard C++ strings can't handle unicode.
What makes Rust unstable again? Reminder that C++ is and was never backwards compatible either. Not even C is backwards compatible.
Michael Sanders
- compile time sucks dick, big long hairy dick - no integer generics, const fn is severely limited, right now constexpr wins hands down - myriads of compiler bugs, although those exist in any language - core team seems to be very focused on async / await which is only relevant for "writing web servers" - i.e. the only field where Rust will never win any traction. - there is little documentation (besides random blog posts) about what is and isn't undefined in Rust (part of why I'd like to see a specification). - no GUI - In hindsight, C++'s iterator-based containers such as std::map, etc. are way more powerful than Rusts .entry() APIs, which is necessary for some algorithms - yes, you run the risk of iterator invalidation, but you get better perf in return - Architecture / OS support still very limited (afaik Rust can't run on Windows XP due to problems with std::Mutex) - although there was one guy who ported Rust to MS-DOS, that was interesting - Still no stable Rust ABI - No proper multimedia libraries (video decoding, audio playback is at least a bit better due to VST community), many libraries extremely lacking: don't get fooled by the "16000 crates" thing - 90% of crates.io is crap. There are maybe 500 crates that are actually good, the rest are hello world apps, useless CLIs and wrappers around deficiencies that patch arounds Rusts way-too-small stdlib - And again, compile time is crap, which is a problem in fields where Rust would actually be good at (such as gamedev), because you need to quickly recompile stuff - and here C++ (or hopefully JAI) is better
Cameron Hernandez
What do you mean you can't do that? uint8_t* pointer = (uint8_*)(0x12345678); *pointer = 0xDEADBABE;
C/C++ doesn't exist. There's a language called C and there's a language called C++.
Xavier Gomez
>Not at all. Thankfully it is for majority of people.
Justin Green
>>That's virtual memory There is no distinction between kinds of memory in C. Your OS doesn't let you write directly to physical memory, not C. Rust programmers...
Andrew Howard
It's the lowest you can get to Nvidia hardware. C, for all intents and purposes, is the asm of Nvidia. I'd call that "low level"
Asher Ramirez
that's not directly into memory. also the the CPU won't let you do that without restriction.
Matthew Ward
>for majority of people. I doubt that. Only 4/8gag screeches about politics when they don't like it. Normal people don't screech and even if they do, it's because they don't like politics in general.
Nicholas Martinez
>That's virtual memory The only way to not write to virtual addresses is to bypass the kernel or to not use an operating system. This is not a fault of the language. Heck, even if I used assembly, you would still be bitching about it not being low-level enough, because I would be writing to virtual memory and not physical memory. Yet assembly is low-level by fucking definition
Grayson Young
Read C/C++ as C or C++.
Brody Brooks
C++ has unicode string literals since C++11. >What makes Rust unstable again? The fact that it constantly makes breaking changes? Take dyn traits for example. And that isn't an ancient deprecation like auto_ptr or throw(), it's an important aspect of a young language.
Parker Evans
They choose to ignore rust and that's all that matters.
Landon Rivera
So you agree to him, C doesn't let you write directly to your memory. Why spread fake news? Is this some kind of C propaganda?
Landon Lewis
>Yet assembly is low-level by fucking definition which definition? Which assembly?
Jackson Ross
C allows you to write directly to memory. Virtual/physical distinction is something you created few posts above and is not related to the topic.
Zachary Butler
No it doesn't really. STL is unable to iterate over UTF-8 graphemes. Doubt that as well. They find Rust hard and rightfully so. Not because of the politics. It is on topic. C lets you mutate virtual memory, not actual memory. C is not low level.
Dominic Davis
>C allows you to write directly to memory >different kinds of memory are not related to the topic then you can directly write to memory in python too, heck you can in haskell too Also what became of the "without restriction"?
Benjamin Kelly
c is not low-level. It's closer from metal than python js ruby etc, but that does not make C a low-level programming language. So keep calm and wash your penis.
according to you, because this will write to the virtual address 0x12345678 instead of the physical address 0x12345678, it's not low-level that's a shitty criteria to determine whether a language can be deemed low-level, or relatively low-level (to python, or javascript, etc)
Justin Baker
It makes sense then. But I think most people, like myself, as you can see, evaluate the slash as saying "C and C++ form together to be of a larger system." For example, "GNU/Linux" implies such a thing. I guess that's why the slash still makes my 'tism act up.
Liam Powell
The STL is shit, sure, but Rust's standard library isn't any good either. Enjoy "fearless concurrency" with only atomic integers and bools!
Jose Ramirez
shut up tripfag
Christian Peterson
>C doesn't let you write directly to your memory How do you think the kernel does it? This argument hinges on what ring you're dealing with more than anything else. The syntax is the same.
Elijah Stewart
Nice cope, how does it feel to be cucked by a tripfag?
Nice shifting of topic there. I was talking about C++ not being able to handle unicodes. Your original claim was that C++ can do things that Rust can't. Still waiting for an example though.
Connor Reed
Whether a language is low level or not is entirely relative and dependent on what you're comparing it to. Compared to Java, Python or Javascript, C is low level. Compared to Assembly, Forth not so much.
Daniel Price
I only write C++ these days and I can understand why you would want a compiler that ensures you never get a segfault as those can be hard to track down. But what I fail to see is why not just make a better linter and compiler for C++? As a language, C++ is fine even if some "experts" on Jow Forums doesn't agree. I think it is one of the best languages when it comes to maths as the language allow you to do a lot of things that is deemed crazy by Java, C and python standards. Obviously Matlab, R and julia are easier for pure calculations, but in C++, you just include eigen for the calculations and then you can keep using C++ for the actual programming.
Hudson Green
>How do you think the kernel does it? By asking the CPU. What kind of question is that?
Daniel Edwards
this
William Rogers
You shifted the topic to the standard library rather than anything the language is innately capable of. I responded on your own terms.
Rust's compile time evaluation and generic programming are both laughable compared to C++.
Parker Butler
let pointer = wordPtrToPtr (WordPtr 0x12345678) in do poke (castPtr pointer :: Ptr Word32) (fromIntegral 0xDEADBABE)
>that's a shitty criteria you came up with the ability to directly write into memory being a feature of low-level languages.
William Long
>You shifted the topic to the standard library No. In fact I argued that the Rust's std library is inadequate from my very first post ITT. Try again.
C++'s modules system and pattern matching is laughable compared to Rust.
Nathan Diaz
>laughable compared to C++. >laughable kek, C++'s are shit, utter garbage, it shouldn't laugh of something slightly worse.
Landon Martin
Also Rust has hygienic macros, C++ doesn't.
Oliver Ross
when i said "that's a shitty criteria" i was referring to virtual addresses vs physical addresses, because when i posted you were complaining how it wrote to a virtual address instead of a physical address and how that proves my example isn't low-level then i wrote a similar write-to-memory-address in assembly, yet you aren't complaining about virtual addressing there
Kayden Baker
Modules are coming in C++20. C++ compile times are already better than Rust and will become even better when modules land. C++ pattern matching support is shit, sure, but you can get adequately close with a library. Not the standard library though.
Hygenic macros are cool and all but I find I don't need anything more than what template metaprograms can offer. What's an example of a Rust macro that makes a major difference to the code you're writing?
William Evans
>sepplefags have no Hygiene yikes
>yet you aren't complaining about virtual addressing there why repeat myself?
Charles Johnson
Sepples has no legitimacy, whatsoever, to complain about compile times. Modules will arrive with C++20, but we both know it'll take another 3 years before it actually gets adopted. I sure hope for that mess of a language rust's compile times won't get better.
Kayden Price
simon peyton jones drew a very similar graph himself, except the y axis is "useless to useful" and the x axis is "unsafe to safe" ha ranked Haskell on the safe but useless part of the graph. youtube.com/watch?v=iSmkqocn0oQ
Nathaniel Sanders
>why repeat myself? so regardless of whether i write a write-to-memory-address program in C or assembly, you still think it's not low-level because in both cases it writes to a virtual address instead of a physical address
>What's an example of a Rust macro that makes a major difference to the code you're writing? Since Rust has no pi types and no support for TMP, you do a lot of things with hygienic macros. To the point that hygienic macros render TMP almost useless. It's just that the idioms are very different between Rust and C++ but they try to achieve the same goal.
I doubt your sincerity. C compiles to CPU instructions just like any other language.
Brandon Hill
>so regardless of whether i write a write-to-memory-address program in C or assembly, you still think it's not low-level I don't think it. It's just not low-level >because in both cases it writes to a virtual address instead of a physical address No, you said that C was low-level because of the ability to *directly* write into memory *without restriction*. I'm saying you're lying. I don't agree that the distinction between physical/virtual is off-topic just so you'll stop screeching about C not being low-level.
So there's nothing special C does that Rust cannot. I know, but someone ITT said it in a way that only C can "directly(!) write to memory"
Evan Watson
>Sepples has no legitimacy, whatsoever, to complain about compile times. I'm not trying to claim C++ has good compile times in general, but they are better than Rust. >Modules will arrive with C++20, but we both know it'll take another 3 years before it actually gets adopted. gcc and clang usually have working implementations of C++ features several months to a year before the standardization is finalized, and C++20 modules let you import legacy headers to smooth over the transition.
I'll admit that I'm not 100% familiar with Rust idioms. Can you demonstrate how hygenic macros are idiomatically used to emulate Pi types?
Henry Gray
It CAN directly write to memory, but it's dependent on the context. Regardless of if Rust can or can not do the same. So the statement isn't exactly false, however in a pedantic conversation, it is ambiguous. Just to clarify.
Gabriel Young
>It CAN directly write to memory it can, on some obscure architectures.
the CPU won't let you do that IF a kernel runs in it which activates the MPU by default the CPU will allow you to write anywhere, only if an OS sets the appropriate flags does memory protection kick in
Levi Ramirez
Rust is a cool novelty but it's an attempt to fill an inflated tire with air. Fixes things that weren't broken. c let's you integrate assembly into the compiler. Is assembly also high level because you aren't manually sending jolts of electricity down intentionally chosen individual transistors to elicit a reaction, too? My main problem with Rust is the community and that I'm skeptical of it. It may be an improvement on c++ but I'm skeptical that it really is because it was originally compiled in c, and only after that initial compilation could it compile itself. is rust just c++ with definitions and syntax changed? If so it's fixing something that isn't broken.
Landon Powell
>but I'm skeptical that it really is because it was originally compiled in c, and only after that initial compilation could it compile itself. wow, imagine being this much of a brainlet. Like, I don't anyone around me that could say such idiotic things even if they were getting paid for it.
Julian Harris
I agree on the Rust community thing. However, if you think logically, Rust is too difficult for the non meritorious people of the community and by its own virtue Rust weeds out idiots like them.
The only people that can cope with Rust's strictness are the smart people that are already accustomed with the debug nightmares you gain from your C++ experience.
Luis Lopez
top tier pcj material right there
Xavier Bennett
I can't use RUST as it captures by reference, mutable reference, and value, in that order, and you can't change the order. The only option you have is to use "move" to capture by value, but it's insufficient and non economical compared to c and c++. Under no circumstance have I been able to find rust's memory allocation is on par with the way c++ handles it (c++ compiler will allocate and destroy as needed). Rust is constrictive and I hate that it doesn't have exceptions. I feel restricted by the language, and bound by its barriers, instead of able to break them easily as I feel with c and c++ and even ocaml. What videogame engines are written in rust?
Jordan Perry
I would consider this as a negative attribute to the language, rather than a positive. Bragging about debug hell that c++ has... shouldn't rust have a goal to avoid that? >non meritorious. A clever trick is a true programmer's boon. Rust seems to be philosophically against even being 'allowed' to think outside the box.
Easton Bailey
Do you know what language LLVM (the tools used to make the original RUST compiler) is compiled in? >calling others brainlet. RUST is a c++ derivative language in every way because LLVM is, just because Rust wants to erase the history of its ocaml implementation (deleted the source code) doesn't mean I'll forget.
Zachary Clark
How many lines of c are in the current Rust implementation? Several thousand at least.
A percentage isn't an answer. LLVM fundamental is 100% c++. I hate your retard community, but I hope the language does well. 0.3% is thousands of lines of code and not all lines of code are created equal.
Daniel Robinson
>that 0.3% is worth more than the other 99.7% though.
Leo Evans
Nice Cope haha
Jacob Long
Damn based tripfag BTFO'd sepplesfags and cniles all together
Cooper Howard
>wow, imagine being this much of a brainlet. >LLVM is written in C++ and is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. Guess what RUST uses? Guess what happens if rust DOESN'T use this "0.3%" of lines of c++ code? Let me know when RUST has it's own optimizer faggot, until then it's just more of the same bullshit with glitter on it, not some fundamental improvement. LLVM is the most fundamental part of what allows RUST to work and it's written in c++ so suck my dick. It is optimizes the shit you give it into the machine layer. it's c++ not RUST, too, so OF COURSE Rust can "compete" with c++, since it's using it.
Christopher Barnes
>Let me know when RUST has it's own optimizer faggot, until then it's just more of the same bullshit with glitter on it, not some fundamental improvement. What kind of reasoning is this? >Rust is bad because the optimizer of it is written in a bad language
Jeremiah Hall
Learn what LLVM is, based retard. Here's a start from your favorite website: en.wikipedia.org/wiki/LLVM It provides the optimized intermediate representation for your code, it's written in c++. It's inarguable at this point unless you literally don't know what the intermediate layer is, that RUST relies on c++ to work at its most base level, fundamentally.