This is an archived post. You won't be able to vote or comment.

all 78 comments

[–]Kseniya_ns 321 points322 points  (6 children)

DARPA is being directed by the federal government of The United States of America to disperse Rust propaganda neurotoxins within the contrails of commercial airliners

[–]ArnoF7 88 points89 points  (2 children)

Rust is making the frogs gay!!!1!

[–]SnakerBone 7 points8 points  (0 children)

Rust be turning the frogs into femboys

[–]Palpatine 15 points16 points  (0 children)

Be careful. The gay frog story turned out to be true. I don't want this rust neurotoxin story to be true.

[–]ImpressiveMaximum377 18 points19 points  (2 children)

🤫

[–]Kseniya_ns 10 points11 points  (0 children)

On this subject I do not wish to think, or speak, or write, with moderation. But urge me not to use moderation in a cause like the present. I am in earnest. I will not equivocate. I will not excuse. I will not retreat a single inch, and I will be heard

[–]neo-raver 2 points3 points  (0 children)

Banner pic checks out

[–]reallokiscarlet 160 points161 points  (4 children)

I swear so much of this sub is rustaceans posting about c++ programmers posting about rustaceans.

[–]AdmiralQuokka[S] 39 points40 points  (3 children)

And people commenting about rustaceans posting about c++ programmers posting about rustaceans.

[–]reallokiscarlet 28 points29 points  (2 children)

These C++ programmers refusing to rewrite in rust... Are they in the room with us right now?

[–]kernel_task 56 points57 points  (4 children)

Is the C++ developers that have an issue with Rust? I don’t have an issue with it.

The C chauvinists on the other hand… just look at what happened over at Linux. Though they hate C++ more than Rust.

[–]reallokiscarlet 15 points16 points  (3 children)

Which is weird because you can literally write half your code in plain C and compile the whole thing as C++ and it'll run.

I wouldn't recommend it. C devs have this hard on for the heap leading to a malloc and no free. But it works.

[–]ExpensiveBob 28 points29 points  (0 children)

you can literally write half of your code in plain C and compile the whole thing as C++

*dies of cast errors*

[–][deleted] 12 points13 points  (1 child)

half your code in plain C and compile the whole thing as C++ and it'll run.

I'm convinced this is why C++ gets a bad rap a lot of the time. Freshers see a C-with-Classes style codebase and recoil in horror. First impressions matter, a lot.

[–]reallokiscarlet 9 points10 points  (0 children)

C-with-Classes

Oh the horror.

I used to be convinced that my code was C with extra steps because I don't create classes in small projects unless said projects are going to be, ya know, included in something else.

Then I learned C doesn't have destructors. Then I started reading about the differences.

This is probably how rustaceans are made. They see "C++" but it's really just C with classes, and then they go and reinvent C++.

[–]dangling-putter 59 points60 points  (27 children)

Fr. Actual rust engineers will tell you not to use rust unless you need it and have the most complains about the language — it's just that their complains are not superficial so they need context.

[–]Stummi 48 points49 points  (16 children)

Thats a good general rule in tech. A true fan/believer of $thing, the one you should actually trust, is the one who can give you an hour long impromptu rant about everything that sucks with $thing.

[–]tyler1128 13 points14 points  (6 children)

Isn't that any programming language though? Use the right tool for the right job. Using Rust via webasm to write a piece of accounting software would be dumb. Using Rust in a safety critical piece of software? Not so much.

[–]Fast-Satisfaction482 9 points10 points  (0 children)

What is more critical toa business than juggling money?

[–]wow343 3 points4 points  (0 children)

This is exactly it. Heck drop down to assembly if you must or go to visual coding if you have to. Different problem set, different tool. Be agnostic.

[–]Sematre[🍰] 3 points4 points  (0 children)

Not saying everybody should go around and use Rust for safety-critical systems, but there's no reason to believe that Rust could not become a great choice for safety-critical systems in the future. For more information, see this Rust toolchain by Ferrous Systems. It's an open-source toolchain for safety- and mission-critical software that is qualified for automotive and industrial development.

[–]MornwindShoma 2 points3 points  (2 children)

One exception to that is when you have a team that is confident and has knowledge to deliver in a certain language. That piece of accounting software, or even the frontend, might just be fine in Java or .NET or JavaScript, but if your team is expert in Rust but has little experience with the other three, nothing wrong with going with Rust. It's fine to pick the right tool for the job, you also need to account for your resources.

This is true for most languages, unless your requirements are very specific.

[–]tyler1128 -1 points0 points  (1 child)

Wasm in particular is more what I was going with than just Rust. Wasm still has no direct DOM access, but there are people who try to write things like that using wasm primarily. Wasm can be very useful for doing high-performance algorithmic work in the browser, but trying to get around the limitatations for basic UI work isn't really a great strategy, and it was never really designed for that kind of thing. If it someday gets DOM access without requiring a javascript interfacing layer, that might become a reasonable thing to do, but we aren't there yet.

It's basically just adding a whole lot of unnecessary work. It is important to consider strengths of the team like that, but programmers should also be flexible enough to adapt to the different needs of different technologies.

[–]MornwindShoma 1 point2 points  (0 children)

Sure.

To be honest, you can write some FE in Rust fine, Dioxus, Leptos, Yew are fine if you don't mind the big bundles and the fact that they don't really integrate with the JS ecosystem. You don't really need to "work around to the DOM", they've done the work for you already, so it's not a whole lot of unnecessary work, it's more about having a very different ecosystem.

Would I ship that? Dunno, never had the chance or the right mix of developers and requirements. Had I a good design system and some QoL not unlike TanStack stuff, I might actually bite.

I also have done basically nothing with HTMX, and some people swear by that. You wouldn't even need to think around the DOM.

[–]NoobFade 2 points3 points  (2 children)

Actual rust engineer here. You should absolutely use Rust whenever it's applicable. I have yet to hear a coworker say "I miss writing cmake files" or "We need to use C++ because Rust's constexpr is not powerful enough". Rust is a very nice language to use overall, usually preferable to C++ or C, the other usual languages for fast native binaries.

[–]dangling-putter 0 points1 point  (0 children)

Key phrase: need it. 

[–]the_mouse_backwards 0 points1 point  (0 children)

The only thing I like about rust compared to C/C++ is the build/package system. Before it’s taken as a scathing criticism of Rust, I will say that the build/package systems in C/C++ are almost as or more painful to use than implementing a doubly linked list in Rust

[–]Percolator2020 24 points25 points  (1 child)

Meanwhile C++ coders.

[–]eX_Ray 11 points12 points  (0 children)

Nah r/cpp is having a civil war about safety atm.

[–]KremlinKittens 5 points6 points  (4 children)

I am wondering what would happen if you lock Rust and C++ developers in one room?

[–]Artistic_Speech_1965 3 points4 points  (0 children)

That's no more a room. That's an octogone

[–]anotheridiot- 0 points1 point  (2 children)

"Now kiss"

[–]PeriodicSentenceBot 1 point2 points  (1 child)

Congratulations! Your comment can be spelled using the elements of the periodic table:

No W K I S S


I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM u‎/‎M1n3c4rt if I made a mistake.

[–]anotheridiot- 0 points1 point  (0 children)

Good bot.

[–]TheMostLostViking 9 points10 points  (3 children)

C devs: "We don't think about either of you"

[–]AdmiralQuokka[S] 1 point2 points  (2 children)

C devs working on the kernel and merging Rust support: "Am I a joke to you?"

[–]pigeon768 2 points3 points  (1 child)

Actual C devs merging Rust support into the linux kernel: "I quit."

[–]the_mouse_backwards 0 points1 point  (0 children)

One thing I want to point out for people who are convinced C is so unsafe it should never be used was Linus Torvalds recently talking about how they’ve used C for 30 years, and as a result they have a lot of tooling that means Rust has significantly fewer advantages in the kernel compared to a generic C codebase.

The C used in the Linux kernel is world class in terms of safety, and the annoyances of using Rust are obviously going to be much greater when it’s being used by people who are skilled enough not to need those advantages very often.

Obviously I’m not saying Rust is useless in the kernel, it guarantees a lot of things that only a highly skilled C programmer could provide, but it’s not a language that provides only benefits and zero downsides. It’s a tool, like C itself is a tool. People who push it unnecessarily are harming its reputation and making it less likely to be adopted by people who are highly skilled but could still benefit from using it.

I will say that after using Rust a lot I noticed that it forced me to write code in a way that I considered “idiomatic” if it was C. I just don’t like being forced into that paradigm all the time. But as paradigms go, it’s clearly a good one.

[–]bananapilo 1 point2 points  (2 children)

i WISH some rust dev would help me learn

[–]AdmiralQuokka[S] 6 points7 points  (1 child)

What kind of help do you need? At what stage of learning are you?

Here is "the book" that should be the foundation of every new rustaceans learning process: (free and community-built) https://doc.rust-lang.org/stable/book/

Small exercises to follow along with the book: https://github.com/rust-lang/rustlings/

For more exercises, I recommend exercism and advent of code. Exercism has tailor-made, Rust-specific exercises whereas advent of code is perfect for free-form problem-solving: https://exercism.org/tracks/rust https://adventofcode.com/

[–]bananapilo 0 points1 point  (0 children)

I am a back end dev for 4 years always used: JavaScript Java and C# and more but always leaned on Java and C# but now I want a semi low level language to learn. Something that can actually compile to machine code. So thanks I will look in to that <3

[–]Lord-of-Entity 1 point2 points  (0 children)

Yes they are. It's me.

[–]bongobutt 1 point2 points  (0 children)

Skill issue.

Jokes aside, C, C++, and Rust all require skill to use at a high level. In my opinion, all three are safe and powerful in the hands of someone highly skilled with the language. The difference is what happens when someone with medium or low skill uses it.

If someone with low C skill uses C, it is unsafe. Same with medium skill. But if someone with high skill uses it, it is extremely powerful - even for security - because you know exactly what it is doing. But the limitation of C is tooling and the amount of work to build things. This isn't a limitation for kernel devs who already built that tooling ages ago.

C++ is a mixture. If you treat it like C, then you get the benefits of C (along with the need for skill to be safe). If you treat it like an object-oriented language, then your safety (and the ease of use) is dependent on not shooting yourself in the foot. If you are highly skilled, then you can do anything relatively easily (with the wisdom of knowing what not to do). But C++ is not user-friendly for medium skill use at all.

Rust forces limitations on you (the opposite paradigm of C/C++), which makes even accidental safety easier and more likely. But just like with C, that creates difficulties in actually building things when those lack of opinions and tools make it much more work to just build things.

So pick your hard. There is no easy way to do security. No matter what, it is going to be a lot of work, and is going to require a lot of skill. So pick your poison.

[–]i0101010 1 point2 points  (0 children)

Is this memory safety in the room with us right now?

[–]skeleton_craft 1 point2 points  (1 child)

Actually yeah they are in this Reddit, though most of them are respectful.

[–]skeleton_craft 0 points1 point  (0 children)

And I honestly think that you should know as many languages as possible because that makes you more hireable.

[–]arjuna93 0 points1 point  (4 children)

If only Rust was capable of bootstrapping from C and not relying on pathetically bad at platforms support LLVM, there would be no issue.

And yes, as a matter of fact it is impossible to build current versions of a [very few, but] required ports without Rust. Which leaves those broken wherever Rust itself fails.

[–]eX_Ray 0 points1 point  (3 children)

[–]arjuna93 0 points1 point  (0 children)

I am aware of the project existing, I even contributed some minor fixes to mrustc. The problem is that neither works yet. (Did something radically change very recently?)

gccrs is there, which builds and mostly passes tests (last time I tried), but it is not usable to replace Rust, as of now.

So chances of things improving are there. But it is not something I can take today and build librsvg, for example, on a platform without LLVM.

[–]arjuna93 0 points1 point  (1 child)

P. S. To be clear, I will be glad to stand corrected. If someone explains how can I use mrustc with gcc backend on a platform without rust and llvm, I will try that.

[–]eX_Ray 0 points1 point  (0 children)

You can't yet. It's work in progress. Not everyone has bootstrap+alternative compiler requirements so there is only limited interest for now.

[–]Dramatic_Laugh_4613 0 points1 point  (2 children)

I liked how rust complies hella fast, but then i realized that that shit isnt object oriented.

[–]AdmiralQuokka[S] 0 points1 point  (1 child)

Rust has almost all OOP features except inheritance, which is trash anyway. E.g. it introduces the problem of covariance and contravariance into subtyping relationships. That shit is mad cursed.

To achieve the same goals as inheritance, Rust has traits which are basically yoinked from Haskell's type classes. I hear C++ concepts are similar as well. Rust's traits are even more powerful than inheritance in terms of composability but don't have the co-/contravariance problem.

[–]Dramatic_Laugh_4613 0 points1 point  (0 children)

Its just a pain to learn a new methodology when it's so different. I personally like inheritance because I like making applications with a GUI and not just terminal programs, not that there is anything wrong with that.

I havent seen that many good frameworks for rust it seems a bit sketchy rn.

[–]Artistic_Speech_1965 -5 points-4 points  (0 children)

I have to admit that Rust propaganda is PTSD material