Stop Using Rust Use C++ | Prime Reacts

  Переглядів 255,625

ThePrimeTime

ThePrimeTime

6 місяців тому

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed article: / why-rust-is-stopping-y...
Author: Chad Johnson | / chadjohnsonofficial
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts

КОМЕНТАРІ: 889
@anlumo1
@anlumo1 6 місяців тому
That article has the vibe of being written by someone who just had a week of learning Rust and then gave up.
@tsalVlog
@tsalVlog 6 місяців тому
💯
@indiesigi7807
@indiesigi7807 6 місяців тому
Yeah that sounds very much like the people going off on c++ as well.
@bitmasked
@bitmasked 6 місяців тому
I think it's relevant, given how hard the Rust community evangelizes the language. Rust brings a lot of great stuff to the table, but it's not free. Folks who want to make some web application or mobile app can probably do so faster and with less headache by using something else.
@antongorov5275
@antongorov5275 6 місяців тому
Feels like chatgpt to me.
@SaHaRaSquad
@SaHaRaSquad 6 місяців тому
@@bitmasked To this date I have seen very few of those fabled evangelizers compared to the masses of people complaining about them. Maybe they're all on Twitter or something, idk. But I agree Rust is not the right language for most web & mobile apps, at least not for the first version.
@tiagocerqueira9459
@tiagocerqueira9459 6 місяців тому
This is the type of guy that gets things done fast but never maintained his own code
@pexoto5093
@pexoto5093 Місяць тому
Reminds me of my old tech lead. He would spit out terrible code and when it was time to build something on it or fix it, he would put someone else to do it and complain that this person was taking too long and say he could do it much faster. He would also go on to complain about the infrastructure code we had, like ninject and automapper, by saying stuff like "i don't know why you guys just dont use a = b, why complicate so much". He also had written entire systems that just didn't work, and complain that other people messed with it that's why it wasn't working anymore
@leularia
@leularia 28 днів тому
@@pexoto5093 lol
@bursthooverbag10
@bursthooverbag10 23 дні тому
​@@pexoto5093 true 10xer
@naheedray
@naheedray 14 днів тому
​@@pexoto5093😮
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 7 днів тому
My code is so good that it doesn't need maintenance 😎 *adjusts glasses*
@CjqNslXUcM
@CjqNslXUcM 6 місяців тому
Sometimes I'm so prepared for the rust analyzer to tell me how dumb and worthless I really am. I see the errors in the corner of my eye taunting me. They want me to give up. But then I finish some line and the warnings fall eerily silent. I nervously hit build. It works impeccably, no issues, it's fast, it's efficient, it's beautiful. Those are the moments.
@sburton84
@sburton84 6 місяців тому
This is the way.
@vintagewander
@vintagewander 6 місяців тому
exactly my feeling, whenever I hit build and it runs, "But isn't it suppose to crash and some error pops up saying that I've done something wrong?" and nothing happened, dead silent, the program runs as expected, and it continues to run, like it is the most perfect thing you could ever imagine happen, happens right in front of your bare eyes, and you still didn't believe it is real.
@fantasypvp
@fantasypvp 6 місяців тому
​@@sburton84this is the way
@keyboardcruiser1799
@keyboardcruiser1799 5 місяців тому
Poetically written, this.
@AlecThilenius
@AlecThilenius 5 місяців тому
Yea, verily, my progeny, thou hast beheld the radiant illumination of Rust! Dedicate thyself unto the splendor of it's glory, and purge from thine heart all deceitful tongues of false languages. In the radiant splendor of it's glory alone, thou shalt bear witness to miracles unfurled, where the code springs forth, immaculate and functional, upon its maiden invocation. Forsooth, in it's divine presence, the inaugural working of the code shall be as a sacred revelation, a testament to the blessings bestowed upon the diligent devotee. All hail our Lord and Savior, Rust!
@TheBeardedQuack
@TheBeardedQuack 6 місяців тому
I feel the "it works" factor is a massive positive for Rust in the embedded space. I abandonned C++ because Cargo & Cross "just works", rather than fighting with the build tooling to figure out how to get C++ libraries cross-compiling / cross-linking correctly.
@sanjaycse9608
@sanjaycse9608 6 місяців тому
Can you say how i can start in embedded program/space?
@teenspirit1
@teenspirit1 6 місяців тому
I guess cargo is pretty much the only valid argument against c++, if you are using third party dependencies that aren't ubiquitious. If you are using boost, pretty much any mac/linux will have it. If you are using fmt, date, mac/linuxes have you covered. But it cuts both ways. If there is no maintained and tested cargo package wrapping whatevere dependency you need, you're screwed.
@TheBeardedQuack
@TheBeardedQuack 6 місяців тому
​@@teenspirit1In many other languages I can just happily search for the most used library and it's fairly plug and play. C++ has no standard for library distribution, or even finding them. This library is a header file, this one is a bunch of random files, these ones use cmake, that one uses legacy make, etc. And you still need to install the Dev packages on your system in the correct way to be able to link it all together. It's just a pain. So far every crate works on every platform I've tried. It's just never been a problem in rust for me. I should probably clarify I'm in the embedded Linux box space, so I do have a host OS to make use of.
@AlFredo-sx2yy
@AlFredo-sx2yy 6 місяців тому
How many dependecies do you need to get errno in Rust? And how many dependencies and unsafe blocks do you need to actually be able to run in an embedded environment? But hey, who cares about the bloat, at least it comes with cargo!
@TheBeardedQuack
@TheBeardedQuack 6 місяців тому
@@AlFredo-sx2yy Zero, because the standard library functions return errors. Why do I need the errno in rust? And how many unsafe blocks? Again none, I'm building IoT apps, I need things like HTTP request libs, or an MQTT client lib, serialization, etc. If I need any system calls just call it directly C-style, then you might need some unsafe areas, but I've not needed anything like that so far really.
@mage3690
@mage3690 6 місяців тому
"You should use a garbage-collected language just to get things out the door." Got it. LISP, HERE I COME, BABY!
@colemanroberts1102
@colemanroberts1102 6 місяців тому
Unironically, go try it. If you do, go common lisp or clojure, not scheme. The people who like scheme are already using it. Portacle is a preconfigured bundle of emacs and steel bank common lisp that's good to dip your toes in. Gentle Introduction to Symbolic Computation by Touretzky is good for getting your toes wet, then jump into On Lisp for macro goodness. Never flippantly talk about trying lisp. We will find you, and we will explain s-expressions and the superiority of lisp macros again.
@dibyojyotibhattacherjee4279
@dibyojyotibhattacherjee4279 6 місяців тому
I really wanna use but haven't been able to got it working...
@isodoubIet
@isodoubIet 6 місяців тому
I find that take so weird. Like I would need GC maybe 0.1% of the time at best, the rest I find other ownership models much more helpful. Why use a language that optimizes for the 0.1%?
@dibyojyotibhattacherjee4279
@dibyojyotibhattacherjee4279 6 місяців тому
@@isodoubIet again you would fight with the borrow checker for multiple times, hence bringing down the productivity time..
@isodoubIet
@isodoubIet 6 місяців тому
​@@dibyojyotibhattacherjee4279 C++ doesn't have a borrow checker.
@br3nto
@br3nto 6 місяців тому
5:10 The problem with MVPs is that they very easily and quickly become the production code. Once you get an MVP out, so do the requests for changes and improvements and additions. Before you know it, you have a full blown core system written in a scripting language. So do you choose what’s easiest or should you pick what you want to end up using?
@berniecat8756
@berniecat8756 6 місяців тому
Yup. To ship an MVP, Python >> C++ > Rust. Why bother with C++ when you can just ship Python.
@gruntaxeman3740
@gruntaxeman3740 6 місяців тому
That is MVP done wrong. When creating MVP, it is not as doing it half assed. It is doing it already clean but minimum features. Language usually depends on what other people understand or just choosing best tool for the job.
@zvxcvxcz
@zvxcvxcz 6 місяців тому
@@berniecat8756 Every Python project I check out seems to be broken a year later. C++ projects might not be touched the whole year but they compile and run like they were meant to most of the time. Yes, Python has lots of tools for trying to wrangle the environment, but we often don't know the environment the project creator was working with... Python is gross unless it is highly maintained in lockstep with major available environments, not running ahead either and forgetting that many people will be on an LTS Distro, etc...
@thekwoka4707
@thekwoka4707 6 місяців тому
Typescript >> Rust pipeline is nice.
@gruntaxeman3740
@gruntaxeman3740 6 місяців тому
@@thekwoka4707 I... don't get that. How? These are used different kind of software.
@sirhenrystalwart8303
@sirhenrystalwart8303 6 місяців тому
Half the comments: "Well, that's just a skill issue, but not a problem if you *really* know rust". The other halt: "Screw c++, it's too complicated for me to learn"
@ThePrimeTimeagen
@ThePrimeTimeagen 6 місяців тому
welcome to the internet
@Knirin
@Knirin 3 місяці тому
The C++ standard is around a 1000 pages in length. There are currently five or six dialects of the language based on how you count the different standards. Any single dialect is a bit bigger than Rust in complexity but you need to know all of them to understand C++ code in the wild. Inter dialect compatibility is also a problem as well.
@meme-vw1vi
@meme-vw1vi Місяць тому
@Knirin skill issue
@benjamin_fdw
@benjamin_fdw 6 місяців тому
I'm a 10+ year C++ dev and also a full stack JS dev. I could say the same against C++ compared to Js or python to an even bigger extent. Truth I pick the language that's the most adapted to your ecosystem
@anthonysteinerv
@anthonysteinerv 6 місяців тому
Comparing C++ with javascript and python? Don't disrespect C++ with that fucking lame ass programming languages.
@needsloomis7164
@needsloomis7164 6 місяців тому
I thought I was a C++ wiz, then switched jobs and had to learn a whole new subset. I feel like C++ is adapted to too many ecosystems.
@rolmops883
@rolmops883 6 місяців тому
​@@needsloomis7164if you think you're a C++ wizz, you're at the peak of the dunning Kruger graph. You know enough to write something that works, but you don't know enough to know that you've only ever seen 5-10% of the language
@italktocomputers1901
@italktocomputers1901 6 місяців тому
@@needsloomis7164C++ can build so much im always feeling like a noob.
@HellCatLeMaudit
@HellCatLeMaudit 6 місяців тому
JS and Python offer something that C++ does not have: JS can run on the browser while Python has the REPL. At this point, Rust does not offer something that is compelling enough to entice C++ developers to abandon the C++ ecosystem. Software is not just built on a language. It is built on an infrastructure of libraries, knowledge, tooling, engineering methodologies, etc. If Rust is truly the promised land as they say, C++ developers can just spend a few months learning the language and then they should be in Rustland, shouldn't they? So why are they not doing so? Because Rust still lacks the things that C++ developers can take for granted. Rust does not yet do AI, for example. Nor does it have GUI libraries. Or how about a well tested linear algebra library for those of us that need high speed matrix computations for Data Analysis? The most popular game engines don't do Rust yet. You're out of luck if you want to use Unreal Engine. All this breast beating talk from Rustaceans sound like high school kids who flunked C++ class and discovered that Rust can do the problem sets better than C++. So they crow about the superiority of Rust over C++. Yeah right, until they decided to try CUDA and then they'll realize Rust ain't there yet. Rust is just a language. It can be learned. But the infrastructure is most important to software engineers who do development for a living.
@HerrSnooze
@HerrSnooze 6 місяців тому
I found c++ really hard to master. I was insecure about where to start, what compiler package manger to use. Which courses or and tutorials to fallow. Learning rust on the other hand was straightforward because the ecosystem is not a old overgrown jungle and the rust book is an amazing starting point.
@profAMuniz
@profAMuniz 6 місяців тому
You mean the book of 2018 that every code written doesn't work on 2023? Sorry bro, I need a more stable language.
@kycklingris
@kycklingris 6 місяців тому
@@profAMunizBut there are barely any breaking changes you false argument creating twat
@tokoucin
@tokoucin 6 місяців тому
You don't need to mastering language, and you just need mastering best practices.
@MrValsung
@MrValsung 6 місяців тому
@@tokoucinwhat advice would you give someone starting with c++
@tokoucin
@tokoucin 6 місяців тому
​@@MrValsung don't be tempted by someone saying other programming languages ​​are better than c++, especially rust.
@celiacasanovas4164
@celiacasanovas4164 6 місяців тому
I totally agree with you assessment of Go. Tbh both Rust and C++ are overkill for a lot of case uses. C# gives you a lot of room for optimisation without writing unsafe code, should you need it, but you often don't. Personally I have this idea that functional-flavoured OOP languages are the best for getting stuff done quickly, because they let you translate algorithms into code very directly, but they aren't too strict when you've got to add in some imperative details or manipulate some state. So C#, TypeScript, Kotlin, Ruby, even more outright functional languages Scala and F#, are ideal to me.
@lukekurlandski7653
@lukekurlandski7653 6 місяців тому
Rust was never really intended for startups to ship products quickly, so these takes are kind of no-brainers.
@principleshipcoleoid8095
@principleshipcoleoid8095 6 місяців тому
Yep. It's to ship the perfect program after a perfect ammount of time spent using the perfect code structure!
@ambiguousspotlightofinsani6764
@ambiguousspotlightofinsani6764 6 місяців тому
@@principleshipcoleoid8095 Maybe we will actually start shipping software *when it's ready* and not when some asshole in management tells us to, because blah blah blah investors and all this shit
@justpatrick_
@justpatrick_ 6 місяців тому
Where is that written
@ccgarciab
@ccgarciab 6 місяців тому
Startup webdevs unironically think every development technology must be a good fit for them or it's worthless
@Reydriel
@Reydriel 6 місяців тому
Ikr, bruh it was designed primarily for systems programming and low-level stuff, no shit sherlock it ain't for rapid startups XD
@linkernick5379
@linkernick5379 6 місяців тому
Rust is "refactoring free", it is such a pleasure not to think about possible SEGSVs or UBs after you have performed a non-trivial refactoring over your codebase. Yes, there could be a ton of complaints from the compiler, but they are all explicit and familiar.
@Vixikats
@Vixikats 6 місяців тому
I still love C++, but the more I write in C, the more I realize that I like C more than C++. I still use C++'s super basic fundamentals like vectors and other earlier STL implementations just because they're really good, but a lot of the more super cutting edge stuff on C++ I just tune out generally.
@Caellyan
@Caellyan 6 місяців тому
C has some really nice libraries that offer most of STL functionality. Why not just switch to pure C? C and C++ compilers work different, using C-like code with C compiler is better than with C++ as the compiler can do different kinds of optimizations and C doesn't bother you as much with type safety if you prefer that style.
@thepurplepanda4
@thepurplepanda4 6 місяців тому
​@@Caellyancant speak for OP but as a primarily Cpp dev, classes and the libraries are for the most part the prevention of going full C.
@Vixikats
@Vixikats 6 місяців тому
​@@Caellyan Mostly it's just what I'm familiar with. I learned C++ first and then went back and learned C. All of my projects are written in C++ and so it's very easy for me to wrap my head around its paradigms. C for me is a very pure programming language without the same kind of bloat, which I really appreciate. C++ STL classes might not always be the most efficient method of performing a certain task because many come with inherent sanity-checking and are built around being generally useful. If I need something hyper-specific for my use cases, understanding the C methods of constructing these complex data structures ends up being extremely useful for squeezing out some extra performance.
@JanuszKrysztofiak
@JanuszKrysztofiak 6 місяців тому
I would choose C++ over C each time. C promotes monkey work, fragility, wheel-reinventing and pointer bugs. I find it a horrible language to work with. The only "good" things about C are that 1) it compiles faster (less complex language), 2) its primitive nature makes it relatively easy to invoke C code from other languages/run-times., 3) one may expect that even the most obscure platform has a C compiler (which is not so likely with C++, much less so with C++20 and later).
@insiderich7372
@insiderich7372 5 місяців тому
​@JanuszKrysztofiak I always find the pointer argument hilarious. I mean rhe whole point of C is safety-off approach. Cant deal with pointer, maybe dont C or C++ would be my answer. Of course, learning C++ coming from C world is like jumping from paradise into purgatory. I take a swig of the Rust liquor time to time to get motivated to keep at it with C++ 😂
@kingofdreams7777
@kingofdreams7777 6 місяців тому
Surprising that this article highlights the struggles of the borrow checker so much that it would wholly delay shipping a product. Like… it’s not THAT hard. Yeah the borrow check has kicked my sweet cheeks many a time, but has it delayed my dev speed or dev ex? Not as much as runtime errors in JS 😂😂
@admazzola3569
@admazzola3569 6 місяців тому
after 6 months of 'fighting w the borrow checker' i never fight with it anymore. I now know how to borrow and clone and i now know that strings are completely insane in rust and why (its worth it) and now i write rust as fast as i write js. actually even faster bc i dont need to do live tests to make sure features work. The compiler is like my test suite
@johanngambolputty5351
@johanngambolputty5351 6 місяців тому
Lets talk about shipping buffer overflows to users in record time...
@raidensama1511
@raidensama1511 6 місяців тому
It’s a race…. condition 😅
@robonator2945
@robonator2945 6 місяців тому
The issue is, when you *_do_* make the product, how much technical debt do you want it to be? Rust turnaround times are slower, but the final products tend to be more well put together.
@mattymerr701
@mattymerr701 6 місяців тому
I've had to port programs back out of rust before because the spaghetti nature of the rust code and the lack of people to maintain it was untenable Not necessarily a rust issue. More to do with the whiteboard jerking that was done by the original sole dev and the lack of skill with the new devs.
@robonator2945
@robonator2945 6 місяців тому
​@@mattymerr701 Oh certainly there are a good few shitty rust code bases, but you'll find plenty of people who say "after spending a few hours fighting with the borrow checker I rethought my design and realized there was a much simpler way of doing it" or some such. Some people *_do_* just keep beating the shit out of the compiler until it does what they want, but it's the extra nudge that makes people less likely to write shit code and have it reach production before them rethinking it. The way I see it is that rust all *_but_* forces you to write the best code you can for all the code you write. That doesn't mean your best is *_the_* best, and it doesn't necessarily mean every single person actually does even write their best, but it is a strong push in the right direction. While this means initial development can be far slower (although some people argue even that's not necessarily true) it means that when your "MVP" inevitably becomes production you'll pay for it far less.
@phoenix-tt
@phoenix-tt 6 місяців тому
​@@mattymerr701 What I noticed with Rust is how easy it is to Refactor once you get the idea of what code does. The type system immediately shouts at you if you forget about something. Especially enums and error types which are non-existent in most languages.
@Dredge22
@Dredge22 6 місяців тому
If your racing the market, the only thing that pays the bills is getting out first with something that works "well enough". See Windows for instance, terrible hacked together and partially stolen garbage code but first to market with their feature set. Most of that trash code is still being shipped to this day. While your writing your app in rust "safely" a high school student will beat you to market and capture most/all of your customer base with some python mostly copy pasted from stackoverflow and copilot. Customers don't care what it's written in, how well, or how "safe" its claimed to be.
@NihongoWakannai
@NihongoWakannai 6 місяців тому
The problem is that no one in business has any idea what is going to work or what wont, so they don't want to invest in a well made program that might have no profit potential.
@bravethomasyt
@bravethomasyt 6 місяців тому
I disagree that you can't ship products quickly with Rust. Maybe 3 years ago, but the ecosystem is much more mature now. I recently rewrote an API layer in Axum (as an example) and it took no time at all.
@luca4479
@luca4479 6 місяців тому
Yeah if you’re starting from scratch then sure, it will take a while, but the established frameworks give you insane speed. Honestly axum API’s can be written just as quickly as in any JS Framework, if you understand the framework. And axum’s middleware is GODLY. (Middleware can do anything you can think of)
@dschledermann
@dschledermann Місяць тому
I come from PHP. I currently work on a huge, 14 yo project, which started with some old PHP5 version. Was it quick to MVP back then, more that a decade ago? For sure. Is it a PITA to maintain now because it's spaghetti? Yup! I've recently had to rework some of the code because a new algorithm was required. The old one was already slow and had a tendency to eat up all the memory, and this new one would be even more taxing on the system, so I decided to just give Rust a try for this. The end result was: - A lot less code. Rust simply seems less "noisy" than PHP. There's a lot of ergonomic features to Rust that are not exactly absent in PHP, but just more hassle. Example: Cargo is just build-in, whereas Composer is a later and optional addition. That has many implications. Take namespacing as an example. Rust namespacing is fairly implicit and prevents you from making mistakes. PHP namespacing is much more explicit and provides several ways to make it break. You have to mention your namespace in composer.json and provide the path. The namespace declaration inside the file have to match the file path. Any mistake, and you're debugging why some component won't load. Cargo.toml just doesn't need to know about your internal namespaces. - Potentially as quick or even quicker to code. The type system and compiler feedback just makes mildly complicated things more likely to work in the first try. In PHP you have to rely of much more indirect feedback, unit-testing, static code analysis etc. - Stable. PHP has type safety now, but it's not anything resembling Rust. In PHP, with a big data set, the code would crash with some obscure edge case. - The release Docker-images is 1/50th in size. No, I'm not exaggerating. From >1GB to ~20MB. - A lot quicker. Like 10's or 100's of times quicker. I am perpetually amazed at how much quicker Rust is. - Doesn't run out of memory. A common annoyance with some of our algorithms was simply running out of memory. PHP is just a memory hog, Rust isn't. My most annoying example from PHP was I had to rewrite some component handling a big dataset because Doctrine (a PHP equivalent to Diesel) would not free up old records. I've yet to encounter such a problem with Rust. I've been a PHP-developer for more than two decades, but in a couple of weeks of Rust-programming, I have the feeling that PHP is just .... outdated. Currently, I'm not coding as fast in Rust than in PHP, but it really only feels like something I have to get used to. I also coded a bit of C++ back in computer science class, and I know that it has evolved too, but I have a very hard time imagining that C++ could be coded as fast and safe as Rust.
@mrlordbrutish
@mrlordbrutish 6 місяців тому
"Fighting with the borrow checker" = training your brain how to not make memory management mistakes.
@allcodeconsidered
@allcodeconsidered 6 місяців тому
Clout chasing for views every knows you have say something out of the ordinary to get views he’s marching to the beat of his own drum
@samanthaqiu3416
@samanthaqiu3416 6 місяців тому
once your class design relies on shared_ptr and weak_ptr to explicitly break dependency loops when they are needed, you don't need to think that much about memory management in c++
@jordanrodrigues1279
@jordanrodrigues1279 5 місяців тому
​@@samanthaqiu3416Sure, that prevents double free and reduces memory leaks. What about iterator invalidation or data races? You're not done yet, even in C++. Rust solves a greater set of problems, which is both a strength and a weakness - it can be much harder to make a dirty prototype in Rust. But it's also a lot harder to end up with a dirty prototype as a legacy dependency.
@samanthaqiu3416
@samanthaqiu3416 5 місяців тому
@@jordanrodrigues1279 disallowing data races by disallowing data sharing is like reducing world hunger by eliminating hungry people: it technically accomplishes the original goal but in a very unintended coarse way
@fr5229
@fr5229 4 місяці тому
I think the point that you missed in the video is that Rust restricts you to a subset of the *safe* programs that you’d be able to write in C++. You’re not training yourself to not make memory management mistakes, you’re training yourself to respect the arbitrary (and limiting) boundary of the compiler.
@uuu12343
@uuu12343 6 місяців тому
I typically switch between C++ and Python depending on usages, thinking of learning golang and rust in that order, but these 2 alone already covers for quite a fair amount of use cases (for me at least)
@yellingintothewind
@yellingintothewind 6 місяців тому
pybind11, or its modern alternatives, are great for this. Do the high level logic in python, with hot-path functions implemented in C++, without the tedium of hand-writing C-python extensions.
@StdDev99
@StdDev99 6 місяців тому
Actually, you can totally make the application code simple in C++. You just need to make another complex layer and separate it from the "business logic".
@Inf1e
@Inf1e 6 місяців тому
Totally correct take. My dad (senior C/C++ big data dev) recently complained about refactoring 5k strings header. Complexity can go to mindblowing levels.
@yellingintothewind
@yellingintothewind 6 місяців тому
This is Greenspun's Tenth rule in action. Want to have an excellent, stable program written in C++, the core of it turns into a lisp machine with a DSL on top of it. The key is to understand and embrace that so your DSL is good and your lisp core is well defined.
@alexaustin6961
@alexaustin6961 6 місяців тому
I can move much more quickly in C++ than I can in Rust, but for this article it doesn't quite fit because C# iteration time is like years quicker than either of them. C# is just easy similar to how Go is, so I would put C++ in the Rust camp for this article's point
@jmickeyd53
@jmickeyd53 6 місяців тому
Yeah, the author does themselves a huge disservice by lumping c++ and c# into the same argument. They are completely different domains.
@RicardoSansores
@RicardoSansores 6 місяців тому
Writing an app in rust is easy just as easy as any other language if you know basic rust. Writing a well architected library in Rust can be challenging. But thats a skill issue. With basic rust knowledge I created a backend using tonic and a front end in leptos just in the same time it would take to do a java spring + react. When I wrote my first serial rpc comm async protocol... that was a completly different beast. But it was a skill issue. Writing that in any other language would be hard too. Maybe just a little harder in Rust.
@stysner4580
@stysner4580 6 місяців тому
What I love most about Rust is if it works, it works. No runtime surprises a week into your program warranting a reformatting of half the project. With Rust you pay up front so it's smooth sailing after everything is in place.
@suede__
@suede__ 6 місяців тому
The problem is that Rust is new enough that you most likely have to convince business that it's worth the cost (which is a hard sell). And the way I see it, the only way you'll see Rust knowledge is either by hard core devs whose hobby is also their job or the company has actually made that business decision. Probably why you don't see a ton of Rust.
@skilz8098
@skilz8098 5 місяців тому
I've been using primarily C++ over most other languages for years. Now, each and every language has its own pros and cons and C++ is no exception. So I'm going to try and propose this think piece without using my own preferences to any given specific language. I'm trying to do this in an unbiased manner. So here it goes... When you have production code that isn't necessarily used just in the business sectors of our current technological progress, but is used in critical systems where human life is at risk such as in a Nuclear Reactor, as in the Guidance System for Airplanes or Ocean Liners, as in Traffic Controllers for either Ordinary Highway Traffic or even for Railway Network Systems, or code bases that are within the medical community within advanced equipment such as MRI machines, Catscans, X Rays, and other diagnostic systems... My question then becomes Which Language are you going to Trust the Most to ensure the least amount of critical errors are present to prevent any kind of harm to human life or severe damage or destruction to any of these vital systems? I think this is more important than arguing over the semantics of a given language. And the answer or consideration of this question is where some languages do shine over others... Sure when a particular application has no direct influence on harming another person or potentially causing damages in the millions or even in the billions such as a piece of code to operate a remote control for a television, or a network piece of code for audio or video playback, or a piece of code to track recent sales then the language here doesn't really matter. Yet when you go beyond that and you are responsible for a code base that is used in critical systems such as a piece of code within an automobile that determines if it should apply the breaks or not, or to deploy the airbags, etc... which language are you going to trust? This is less commonly talked about in many circles when there's a debate between one language versus another... Let this sink in for a few moments!
@GilbertoAlbino
@GilbertoAlbino 6 місяців тому
I love all those programming languages, Rust, C++ and C# included! Still not having time to read all the good books I bought to learn it. It's more likely to Rust having a "version 2" than I effectively having time to learn it in order to do anything I wouldn't do in C++ or C#.
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 7 днів тому
What advantages does microsoft Java have over oracle Java?
@fischi9129
@fischi9129 6 місяців тому
For game dev, the Bevy engine looks really really promising ngl
@phillipanselmo8540
@phillipanselmo8540 6 місяців тому
this article is literally just "rust doesn't pay my bills, therefore it's bad"
@timseguine2
@timseguine2 6 місяців тому
Actually a lot of people talk about the "rule of zero" in C++ nowadays. The idea is if you compose datatypes correctly, the automatically generated special functions will be right with no additional work.
@stysner4580
@stysner4580 6 місяців тому
Implementing stuff correctly consistently is hard though... I like relying on the compiler for that.
@DanielJoyce
@DanielJoyce 6 місяців тому
Or you could just use a language that already does it properly...
@isodoubIet
@isodoubIet 6 місяців тому
@@stysner4580 " I like relying on the compiler for that.' Yeah that's what the rule of zero is for.
@isodoubIet
@isodoubIet 6 місяців тому
@@DanielJoyce That's C++. No other language does it properly.
@blarghblargh
@blarghblargh 6 місяців тому
@@isodoubIet sure. C++ doesn't do anything properly either. if it did, there wouldn't be so many ways to make mistakes or so many rules to remember
@cerulity32k
@cerulity32k 6 місяців тому
After around a year of using Rust, I can say my productivity has actually improved over languages like C++ or C#. In those languages, I always feel the need to write utilities, I will get some obscure exception, or I worry too much about handling edge cases. In Rust, edge cases are wrapped in things like Result or Option, and are easily dealt with. Exceptions don't exist, only panics, which are either explicitly done through unwrap() or `Index`ing out of bounds (which is also prevented through get()), or by cases in which there is a bigger problem (out of memory). The only sort of utilities I need to write are math utilities for things like collision between two shapes or FPS-independent lerp. It's very clear and easy to learn how the compiler and projects work. Not to mention the tangibility and clarity of the language. Overall, Rust enabled me to get stuff done faster. I'm planning to go into cybersecurity and software engineering, and a safe, efficient language like Rust is perfect.
@celiacasanovas4164
@celiacasanovas4164 6 місяців тому
There's theoretically nothing stopping you from using Options and Results in C#, and in fact that's the F# way, but the fact that the dotnet ecosystem is null and exception based sucks. I wish Microsoft would fund a project to rewrite it all in monadic style (exceptions suck so much Results are actually more efficient despite having to be unwrapped!) now that C# has decent pattern matching, but I guess it's a massive undertaking with little immediate ROI.
@cerulity32k
@cerulity32k 6 місяців тому
@@celiacasanovas4164 If C# had TSUs, then I would be happy.
@danielhalachev4714
@danielhalachev4714 6 місяців тому
I just use optionals in C++, when I miss this feature.
@celiacasanovas4164
@celiacasanovas4164 6 місяців тому
@@danielhalachev4714 yes but the problem is the standard library is full of nulls and exceptions
@oglothenerd
@oglothenerd 6 місяців тому
The first Rust compiler was written in Ocaml.
@celiacasanovas4164
@celiacasanovas4164 6 місяців тому
ocaml, and the ml family in general, are really good for compilers and interpreters
@oglothenerd
@oglothenerd 6 місяців тому
@@celiacasanovas4164 Sounds like it!
@gh0stcloud499
@gh0stcloud499 6 місяців тому
I think a big problem with C++ is that there isn't a 'standard' package manager. So in order to write you program you no only need to write C++ but also make, or figure out how to link all your shit together with bash (and if you are cross platform you need to replicate that exact behaviour with powershell or whatever). Yes I don't have to fight the borrow checker, but I have to write my own build system. Sure this is also a skill issue I guess but so is working with the rust compiler. Just different trade-offs. Also agree with the C# comparison, doesn't really make sense. You could compare any low level language to C# and make the same arguments. Apples and oranges.
@mattymerr701
@mattymerr701 6 місяців тому
There are a couple package managers now, but they are honestly all trash. The build situation in C/++ is absolutely dire.
@anthonysteinerv
@anthonysteinerv 6 місяців тому
Is it really that hard to learn how compiling and linking works? In less than a day you learn to do that. If you have to work with it every day it would be crazy if you don't even know how to compile and link libraries lmao.
@isodoubIet
@isodoubIet 6 місяців тому
" Yes I don't have to fight the borrow checker, but I have to write my own build system. " I mean that is your choice to make, there is nothing standardized but there are plenty of solutions out there that enjoy a lot of support. It's very unlikely your specific situation is so special that something like cmake + vcpkg won't work for you.
@wolfgangrohringer820
@wolfgangrohringer820 6 місяців тому
@@anthonysteinerv I think that's not the issue. The issues is that many libraries worth using (in the sense that it pays off not writing the functionality from scratch) are large and complex enough that in practice they use / require some build system - usally CMake - and that in the absence of any enforced standards every project layout and CMake use (and this likely includes your own project) is just a bit different and basically a snowflake. So that your choice is to go wade through their CMakeLists to figure out how to have everything built in your CI pipeline from source and adapt your own build accordingly, or to give up and get binaries, which is great until you run into ABI incompatibilities that in some other language are prevented by a decent package manager. Although I have recently had a fairly good experience with Conan for my own projects, so perhaps there is hope.
@leonardeuler4
@leonardeuler4 6 місяців тому
​@@anthonysteinerv It's not hard, on the contrary, it's a very stupid manual work that wastes your time
@joshmo3611
@joshmo3611 6 місяців тому
With regards to shipping Rust being slow: You can ship fast with Rust! The company I work for (Shuttle) works with primarily Rust. The issue is that you have to actually become (moderately) good with Rust first. I've produced Axum APIs pretty quickly (spinning up a CRUD API with extras in about 5-10 mins, depending on what the extras are).
@SunHail8
@SunHail8 6 місяців тому
just say it frankly - 've you been writing unsafe code w/ mix of c/c++ or is it only pure rust thing?
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 7 днів тому
@@SunHail8 I am guessing you were spot on by the lack of his response
@SunHail8
@SunHail8 7 днів тому
@@Forty8-Forty5-Fifty8 actually, i've written my experimental project (TAM_RUSTy) &. huh, Rust is extremely poor thing w/o unsafe :)
@thekwoka4707
@thekwoka4707 6 місяців тому
The safe programs that aren't demonstrably safe is rust category is quite small. More often it is that the person is writing unsafe code (or code that will later become unsafe) but haven't been bitten by it. If you want to get programs out fast, having them be demonstrably safe is good, since you can iterate faster and spend less time with avoidable bugs. It's the same with JavaScript developers who think it's such a hassle to write typeacript instead. They are used to writing unsafe code and either debugging the problems manually or just ignoring the edge problems entirely.
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 7 днів тому
TS seems like it is only useful if either 1) you didn't learn JS correctly the first time(but if you didn't learn JS, I doubt you're gonna learn TS) or 2) work in big multi-developer projects It's also so ugly and now you need another transpiler in your build process. My node environments are bloated enough god dammit
@Valiant600
@Valiant600 6 місяців тому
He mentions the game industry is still not using Rust. Rust is new and most gaming companies have gigantic codebases. No sane person would say "oh lets port everything to Rust". Meanwhile, you have Unreal using a complete custom flavor of C++, which essentially throws away std and stl because they want to make the code as safe as possible.
@indiesigi7807
@indiesigi7807 6 місяців тому
unreal is just plain c++.
@anthonysteinerv
@anthonysteinerv 6 місяців тому
In what world not using stl containers is not using a "custom flavor of C++", in almost every big company they write their own stl.
@oscarsmith-jones4108
@oscarsmith-jones4108 6 місяців тому
@@indiesigi7807 It isn't just "plain C++", they added garbage collection and reflection.
@Muskar2
@Muskar2 6 місяців тому
Lots of studios write their own tools. But even their own math, intrinsics, allocators, job queues etc. which wouldn't need to vary if the standard library was actually well-written, lean and easy to learn. But instead we have std::string doing many allocations as if it doesn't matter what happens under the hood, when it most certainly does for the industry pushing the hardware to its limits - and I think few outside the AAA game industry would complain if they were just struct string { i64 count; unsigned char* data } with utility functions like to_c_string, to_upper, to_lower, is_alpha, is_digit, is_alnum, is_space, copy_string etc. and a string builder for huge strings.
@deNudge
@deNudge 4 місяці тому
Somebody once told me "Go is so boring!", and I thought: "Yea, this could be my cup of tea! I have kids, and I need to get things done. I don't need creativity in my daily business..." 😀
@thomassynths
@thomassynths 6 місяців тому
C++ doesn’t fruck around.
@larryrowe
@larryrowe Місяць тому
I think it depends on what part of your overall code/data balance as to what you target were you really need max performance and use utility with the best code where you are not worried about large data volume slow management, javascript for html human interaction, java/etc. for basic logic, Rust/Go/C where moving large data as efficient as possible ....
@furjock
@furjock 6 місяців тому
I might as well ask! I’ve never written code ever, but decided at 57 I want to create a project on Kusama, which is all substrate from what I understand. Do I learn Rust? I’ve seen other videos of yours which have said use whatever language you are best at. So, since I don’t know ahoukd rust be the one? I’ve seen you mention GO, and said you dislike it but it’s fast and easy.
@abhishekshah11
@abhishekshah11 6 місяців тому
3:08.. One common pitfall with the borrow checker is iterating over a vec while trying to mutate it. I've had this a few times when I wish oh it'd be so nice to do that
@paulneal9908
@paulneal9908 6 місяців тому
The argument is silly. Rusts development time is a trade-off. You satisfy the borrow checker so you don't have to deal with bugs related to data races after. It's also extremely performant so odds are as soon as you finish it, it probably won't need much optimisation. I am a big fan of simple languages that let you get applications up quickly, but the argument for each can't be had in good faith without talking about the time savings rust brings once the program is developed.
@KX36
@KX36 6 місяців тому
When you're developing new features you can build up momentum and get a lot done and then when you've had a chance to stand back and look a the thing and see how it turned out, go back and refactor. Having to write it an idealised way every time can take all the momentum out of development and can make refactoring incrementally a pain in the ass.
@ian3084
@ian3084 6 місяців тому
"C++ and not fighting the language" never heard that before. Of course I was programming before even C++ 11 but I am sure there are many stupid issues with it still.
@rogerbusquetsduran5596
@rogerbusquetsduran5596 6 місяців тому
I think the issue with C++ is that it allows you to do so many things, that the chances of you doing it badly are high, hence the bad reputation, but you don't really have to use most of its features. You can write a full program without any OOP at all, which in my opinion is the biggest problem in most applications, regardless of the language.
@leonwang3072
@leonwang3072 4 місяці тому
You can always kick in a bit of unsafe, with a safe interface. Not a bad way to organize crazy low level stuff safely to a degree.
@raphaelmateusdasneves772
@raphaelmateusdasneves772 6 місяців тому
My problem with C++ is that i need some more time to get "meh" at rust than in C++, i need a lot more time to get "average" in rust than C++ but i need the same exact time to get good in either language. But if i get good in Rust i got 99% memory safety (unsafe in libs or own code, happens) a pretty dang good build tool, bundler, test framework and package manager and in C++ i am still one day of too little sleep away from building in a memory leak that noone notices in tests because it fucks you over when the server is running in production because it trashes a few Kibis per request.
@indiesigi7807
@indiesigi7807 6 місяців тому
c++ will get you a job so there is that.
@raphaelmateusdasneves772
@raphaelmateusdasneves772 6 місяців тому
Nah man, i got java for that xD @@indiesigi7807
@isodoubIet
@isodoubIet 6 місяців тому
" i am still one day of too little sleep away from building in a memory leak that noone notices in tests" It's every bit as easy to write memory leaks in Rust as in C++.
@raphaelmateusdasneves772
@raphaelmateusdasneves772 6 місяців тому
@@isodoubIet How? The only thing i can think of would be Box::leak or something with a static lifetime. . .
@isodoubIet
@isodoubIet 6 місяців тому
@@raphaelmateusdasneves772 ref cycles
@carlpittenger
@carlpittenger 6 місяців тому
i respect the rust project, and think it is a valid successor to c++ in many if not all areas because of its much better defaults, better safety, and integration of functional programming concepts (though i do have serious concerns about the foundation, lack of a standard, single compiler, etc.), but it is hilarious to me when the "just learn rust, skill issue" people complain about c++ complexity
@green-media-pl
@green-media-pl 6 місяців тому
How do you worki without mouse? Is it possible to swe yours setup nad how you used it?
@Polareon
@Polareon 4 місяці тому
Personally I do not enjoy rust I tried it for 3 projects and its just extremely restrictive even if the code I am trying to write is completely safe it won’t let me do it
@JohnnyVestergaard73
@JohnnyVestergaard73 6 місяців тому
My main language for the past 20 years has been C# and a little C++. I learned Rust back in 2019, so relatively new. Yet, in a recent project at work, I created a prototype for a service in 4 days of Rust, only to spen the next 2-3 weeks creating the same in C#. It was very difficult - not because of the language nor the features I used, but due to weird API choices by Microsoft, surprising exceptions etc. I actually prefer "fighting" a little, if it means I have to spend less time testing and debugging. And yes, there is a lot of stuff you don't have to test for when using Rust, simply due to the language and the library API's - which means you ONLY have to test your business logic.
@anthonysteinerv
@anthonysteinerv 6 місяців тому
Imagine you couldn't code in C# what a bum
@Qrzychu92
@Qrzychu92 6 місяців тому
I can a beer that after using a different lang for a bit you tried do C# in a not-C# way - happened to me also. Still, after trying to redo some of myu pet-projects in other languages, C# docs and most APIs are way better than any other I've seen. With Rust you also need a mental switch, because compiler is SO SLOW, and debug builds run SO SLOW, I could basically type faster on my keyboard. You need a completely different workflow for every language. C# is still at the top IMO - even if JS has better hot-reload (while it works more often, it's debatable if it's actually "better"), the debugger is useless by comparison.
@JohnnyVestergaard73
@JohnnyVestergaard73 6 місяців тому
Problem is: I keep getting f***ed by the C#/C++ languages and their missing guaranties/constructions that leave everything up to the programmer (me) - even after NOT touching Rust months. I guess I'm just one of those that find Rust easier, even though I've been using other languages for decades. One upside of C# => Desktop GUI programming.
@anthonysteinerv
@anthonysteinerv 6 місяців тому
@@JohnnyVestergaard73 if you are getting fucked by C# you are just garbage.
@samic
@samic 6 місяців тому
There is a reason why Microsoft themselves decided to rewrite the kernel in Rust instead of their own languages.
@awilliamwest
@awilliamwest 6 місяців тому
After a small project in Rust a few months ago (excited as I was while learning it), I decided it was too much cognitive overhead to get into Rust again for an equally small project, and returned to F#. For small batch processes, the easiest choice is often the one with the most flexible or best-documented libraries. But I remain excited about Rust for web sites, web APIs, and WASM. I'm conflicted as to whether it's at the right level of abstraction for web applications and "business" apps; I feel like most of the "business logic" should be written in a somewhat higher-level language or representation (e.g. serialized to a graph database.)
@32zim32
@32zim32 6 місяців тому
Agreed. Had the same feeling
@KaneYork
@KaneYork 6 місяців тому
If F# is viable, yes absolutely use it
@taylorallred6208
@taylorallred6208 6 місяців тому
I’ll be honest, I love rust and would say it’s one of my most comfortable language at this point, but when I want to play around and just make something casually I really enjoy C/C++.
@dromedda6810
@dromedda6810 6 місяців тому
this artcile must've been made specifically for prime
@iMagicGraalOnline
@iMagicGraalOnline 5 місяців тому
I think people who dislike rust and the borrow checker just have a completely wrong approach to the language as a whole. You dont fight with the borrow checker just because, you do so because it saves you time later down the road and it does so exponentially
@2thirds
@2thirds 6 місяців тому
I did not expect an etymology intro, but that was a lovely surprise
@flogginga_dead_horse4022
@flogginga_dead_horse4022 6 місяців тому
I kinda agree with the C# part. Been using that since 2002 and the ecosystem is important. Been working on writing apps with Axum, SQLX, etc. for a while now and it's really a lot more work to get everything going...
@MrAbrazildo
@MrAbrazildo 6 місяців тому
0:13, C++11 is the "must see" 1. From that, only minor good features have been made. C++20 is now a game-changer, but it's more related to high level features than performance or middle-to-low level functionalities. 0:38, oh... really nice to know that. 2:51, this is what I believe C++ is able to achieve. But that's not its default behavior. 1 should go (sometimes struggle) for it. 7:43, maybe because of its complexity, it feels solid among the complexity of a project. I was making 1 in 2 steps, the 2nd "as a superset" of the 1st. I basically inherited all the 1st step as basic classes for the 2nd. It worked amazingly! Of course I had to amplify things, but no extra problem was added by that. And the classes were organized by data, not so much by meaning. Even so, the whole previous meaning worked for the 2nd, and no performance penalty was added, beyond what was inevitable from more work to do. 9:40, delete all of them, letting the compiler pointing you the missing ones.
@paypalmymoneydfs
@paypalmymoneydfs 6 місяців тому
Lol the C# hate has to end, it could be Typescript
@awesomedavid2012
@awesomedavid2012 6 місяців тому
Yeah it's very unfair. I've only ever used C# for Unity and it was fine. But in my head, I have this bias against it for no good reason. It's basically a better Java.
@colinb8332
@colinb8332 6 місяців тому
I’ve enjoyed working with C#. I think it’s the Microsoft baggage that comes with it that gives it the bad vibe.
@brainsniffer
@brainsniffer 6 місяців тому
Could you imagine if the same people had made both? 😂
@paypalmymoneydfs
@paypalmymoneydfs 6 місяців тому
@@colinb8332 Which honestly should be embraced, the documentation is just so much easier to digest than say Java
@paypalmymoneydfs
@paypalmymoneydfs 6 місяців тому
@@brainsniffer Lmao
@KOMolema
@KOMolema 6 місяців тому
You know, after a while the borrow checker is not a hindrance, it becomes your friend. To be honest I even forget it is there
@celiacasanovas4164
@celiacasanovas4164 6 місяців тому
to me the problem is lifetimes but i think it's a total skill issue in my case
@KOMolema
@KOMolema 6 місяців тому
@@celiacasanovas4164 yeah lifetimes are annoying. I try avoid them as much as I can
@lower_case_t
@lower_case_t 6 місяців тому
If the borrow checker slows down your work that much you can be pretty sure there are plenty of bugs in your code that simply go unnoticed in C++.
@isodoubIet
@isodoubIet 6 місяців тому
Not really. There are entire books dedicated to writing simple data structures in Rust that are basically effortless to write in C++.
@mattymerr701
@mattymerr701 6 місяців тому
Examples?
@ficolas2
@ficolas2 6 місяців тому
@@mattymerr701 Arc Rc Node graphs are kind of a pain, because you are forced to use an arena.
@elvor8512
@elvor8512 6 місяців тому
@@mattymerr701there’s the linked list book, which shows you how to make a linked list starting from a naive solution to a more robust one - but the more robust ones are (iirc) just solutions that work around the borrow checker better
@32zim32
@32zim32 6 місяців тому
It's not true. There is nothing unsafe in getting multiple pointers to array elements and mutate them. Just be careful and think what are you doing.
@diego.almeida
@diego.almeida 6 місяців тому
'100 Go Mistakes and How to Avoid Them'; and 'Let's Go' and 'Let's Go Further' are awesome books
@Alephu5
@Alephu5 6 місяців тому
I have the same feeling when writing go, it feels like programming in crayon but at the end I feel like "was that it?"
@erroneum
@erroneum 2 місяці тому
In regards to your Venn diagram of safe programs vs Rust, there should be at least a small amount for Rust programs which falls outside of all safe programs; just because it can save you from memory management errors (when you're not using "unsafe" to throw that away) doesn't mean that you are guaranteed safety in every case.
@doc8527
@doc8527 6 місяців тому
Funny enough, the borrow checker take is the exact complain people have typescript regardless TS is self is good enough or not. "I know what I'm doing, this type complain made not sense, it wouldn't be null or undefined, trust me bro" One month later, the same person come back and modify something, or data in upper chain changed, forgot all the check thing in his mind. production explodes. Think like an insurance, you pay (struggle with borrow checker or typescript) for something that you wish you will never need to use them.
@AlFredo-sx2yy
@AlFredo-sx2yy 6 місяців тому
The guy in chat at 2:36 literally got shut down like 2 seconds afterwards by ThePrimeagen himself. People are quick to judge. "Oh so he just creates a lot of runtime bugs lmao skill issue!!! xDDDD" oooor maybe shut up and learn what Rust's safety features actually do. Rust does not allow you to build all safe programs that can exist because Rust's safety rules make sure that all possible Rust programs are safe, which means that there are things that are unsafe in Rust but are actually 100% safe to do outside. Just, common sense, logic, reading the documentation and understanding how Rust works. Just all around just knowing how to be a good programmer and not making fun of others for not using your language of choice...
@alkeryn1700
@alkeryn1700 5 місяців тому
my take is that if don't know go or rust and have a week to learn either and build something you should probably go with go, however, if you master both, rust will be a lot more productive in my opinion.
@mrjed
@mrjed Місяць тому
Might try using some rust for DSP applications. Seems like its simple and fast enough to process complex live data at good rates.
@fabianmuhlberger6153
@fabianmuhlberger6153 6 місяців тому
I just had to learn some c++ since it is part of some libs in the project. All of a sudden, I have to learn variadric params, overloaded functions, and some crazy inheritance with friends and overrides where diagrams are needed to understand what is what. AAARRRGG
@Kane0123
@Kane0123 6 місяців тому
The use of the term “most businesses” tells you everything you need to know. Most businesses aren’t building products at a scale which requires the performance and efficiency of Rust. I can pay another $40 per month in IaaS costs to apologise for the difference between C# and Rust.
@kratosgodofwar777
@kratosgodofwar777 6 місяців тому
1:03 what's the test coverage on that rope matey?
@jakubgiesler6150
@jakubgiesler6150 3 місяці тому
Modules work with light cmake file edit I believe, but the ice's are common still.
@cbbcbb6803
@cbbcbb6803 6 місяців тому
Does C# run on Mainframe computers like C and C++ and Java?
@kc3vv
@kc3vv 6 місяців тому
In C++ without the borrow checker you either are only using single threading or it is very difficult to not introduce memory safety issues or you clone values everywhere. With more complex applications multithreading is basically a given, especially if you care about performance (which you usually do with C++ applications).
@samanthaqiu3416
@samanthaqiu3416 6 місяців тому
in C++ if you aren't doing memory management with shared_ptr and weak_ptr to explicitly break your dependency loops, you are designing your classes wrong
@Drummerx04
@Drummerx04 6 місяців тому
I don't find writing competent safe multithreaded code to be terribly difficult... however based on code I have seen in production, it is possible to write truly abysmal code in C++... Perhaps it's not a bad thing to have something like rust after all lol
@ivanyanakiev4544
@ivanyanakiev4544 6 місяців тому
As a c++ dev I would like to see you spend some time in the language I think if you overcome the initial barrier you can start writing good c++. If you spend a little more time to learn templates it would be even better. You can't really do any fun stuff with web dev in c++, but you can make a game for example and I think you will appreciate the language more. Maybe try a quick project with SDL or SFML. I don't know how familiar are you with building c++ since it can be a little hard to get off the ground with libraries. In the end I just think that if you spend a little time learn it you will come to life the c++ ways. Great content, keep pumping it!
@gokusaiyan1128
@gokusaiyan1128 6 місяців тому
crow framework is there for web stuff with C++ but not sure how good it is.
@fabianmuhlberger6153
@fabianmuhlberger6153 6 місяців тому
I recently tried STL and built a roguelike, pretty cool stuff! Absolutely recommended, even for beginners. It's lots of fun and gives a great overview over the possibilities. And it's a fantastic lib
@pweddy1
@pweddy1 8 днів тому
I spent more time in code reviews with the customer then I spent writing code a lot of the time. I suppose it doesn’t matter what language you use or whether it’s correct or not if you don’t have to review it in front of the client? But the client gets pretty pissed when you use something because it’s fast and you’re just pumping out code even though it’s wrong.
@sk-sm9sh
@sk-sm9sh 6 місяців тому
I stumbled upon this article and it was not really obvious to me upon reading it if author actually even knows the difference between C++ and C#. Whilst there is maybe one good point mentioned how C# can be good over Rust (garbage collection) there is not a single argument given how C++ is better over Rust apart from overly generalizations such as "ecosystem of libraries is better" with no examples how it actually is better and besides for C/C++ libraries that are important there often already exists Rust wrappers than actually make it easier to use such libraries in safer ways. Also one idea was mentioned that fixing bugs is somehow a productively spent time however fixing compiler error is not which is just absolutely wrong. Fixing bugs is not a productive way of spending time even if we do get paid for it.
@DevynCairns
@DevynCairns 6 місяців тому
To be honest, after many years of using Rust, I rarely end up in a fight with borrowck. I already know what doesn't work and how to write code that does. If the most straightforward/performant solution involves unsafe code, I first check to see if someone else has already done it. If not, I write it. Unsafe is not illegal.
@ssokolow
@ssokolow 5 місяців тому
"Why are you in such a hurry for your wrong answers anyway?" -- Attributed to Edgser Dijkstra
@porky1118
@porky1118 6 місяців тому
2:22 That's just not true. I almost never have borrow checker issues. Because most of the time, when I'm doing lifetime stuff, the design of my library/program is probably "wrong". So I just design my programs to never use explicit lifetimes most of the time.
@alastor--radiodemon7556
@alastor--radiodemon7556 21 день тому
As for the whole french latin religion thing, rilegare is still used In Italian. It means to bind/rebind but more commonly to tie like a rope or the binding of a book
@zvxcvxcz
@zvxcvxcz 6 місяців тому
Go is easy to set up now? When I was first trying it out, it was NOT fun to get it off the ground.
@mynameisshadywhat
@mynameisshadywhat 6 місяців тому
This guy is like the programming version of Dr Disrespect... Dr Disassembly 😂
@sirrcharles1869
@sirrcharles1869 13 днів тому
😂😂😂😂😂😂😂😂😂😂
@zeekcom12
@zeekcom12 6 місяців тому
Your go recomendation saved my company lol
@DataStorm1
@DataStorm1 6 місяців тому
@2:30 he's using some website to draw some, what site is that?
@DanielAWhite27
@DanielAWhite27 6 місяців тому
The comment about not spending your time fixing bugs or adding features but fighting the compiler is wrong. That time in Rust is an investment to avoid many classes of bugs that are footguns on C++ and C#
@mattymerr701
@mattymerr701 6 місяців тому
Examples?
@mattymerr701
@mattymerr701 6 місяців тому
Examples?
@DanielAWhite27
@DanielAWhite27 6 місяців тому
@@mattymerr701 use after free and other race conditions. For instance, I had a thought experiment on how in C# or C++ one could write a Rust style mutex. I’m sure you could do it at runtime but there are not tools at compile time to prevent leaking out the protected resource.
@logantcooper6
@logantcooper6 6 місяців тому
C++ maybe but not C#
@anthonysteinerv
@anthonysteinerv 6 місяців тому
footguns in C#? Lmao
@doomguy6296
@doomguy6296 6 місяців тому
I don't fight the borrow checker since I started to learn the language. If the compiler says "no". I say "thank you! you are right! Let's fix this". Done
@quickdudley
@quickdudley 6 місяців тому
When the borrow checker says "no" there's nearly always the option of throwing in a `.to_owned()` to keep it happy and then maybe circling back to refactor later if that ends up costing too much performance.
@doomguy6296
@doomguy6296 6 місяців тому
@@quickdudley Cloning is one option that may not always be available. But there could be other solutions. Usually the compiler simply explains the problem. And honestly, over time you can already forsee the potential problems and know to avoid them. It isn't as bad as it is made to believe. It just takes time to get used to. No one has done that before
@vladix32
@vladix32 6 місяців тому
It's interesting how subjective the concept of "large project" is. To me 10k - 250k LoC is a medium-sized project.
@Satook
@Satook 6 місяців тому
This just seems like 2 arguments rolled into one. Ecosystem and (team) familiarity. Both are important when starting a new product or starting a team but neither are constant across teams or domains. C++ makes sense if you’re not doing web dev/APIs. Embedded, IoT, Games, Simulation and some other areas have the largest ecosystems in C++. Go, C#, Python not so much.
@Murv
@Murv 6 місяців тому
The C# standard library structure, documentation, etc is incredibly well written and everything just seems to make sense in how it's named, etc. I think it's weakness is Microsoft, not the language itself.
@michelnielsen2855
@michelnielsen2855 6 місяців тому
spending time debugging a problem is time that could have been used implementing features. spending time trying to understand cryptic code is time that could have been used to implement features.
@b1zzler
@b1zzler 6 місяців тому
I’m not a professional (for now), just enjoying watching the C++ vs rust wars 🍿 May the best language win ⚔️
@vintagewander
@vintagewander 6 місяців тому
rust is a language that is easy to get a project done, rather than easy to start with
@nightshade427
@nightshade427 6 місяців тому
Drogon seems interesting, code looks fairly simple, and its super fast (mayhaps the fastest)
@zosthegoatherd
@zosthegoatherd 6 місяців тому
Programmers and project managers with this sort of attitude are the reason why the cybersecurity industry needs to keep growing... The idea that the market will debug your code is true, but the market includes ransomware gangs who are very willing to put in more time then security auditors...
@Cookiekeks
@Cookiekeks 6 місяців тому
Stupid question, why wouldn't it be possible to implement a garbage collector in Rust to use in unsafe, that you can turn on and off? Wouldn't that fix all problems with Rust? Or is that technically impossible
@IsmeGenius
@IsmeGenius 6 місяців тому
At the point you need unsafe GC no longer can help you. 90% of unsafe is C interop. Other instances are hardware address mapping, complex data structure creation. GC can help with the latter, but it will probably defeat the purpose of creating custom data structure, which is performance.
@arimill1045
@arimill1045 6 місяців тому
All of his arguments are why I moved from C++ to python for business applications, the bias is pretty hard on him. Rust is great
@dimanarinull9122
@dimanarinull9122 6 місяців тому
but C++ is easy, you start with mostly C code, and add features as you see fit. most programs don't need a move-copy constructor, most programs don't need a && in them. the ones that will need them will use them. this is really why you mostly teach the c89 and c++98 for first time users and expand from there. sadly, c++ doesn't benefit from many of the expansions of later versions of c and they also have different standard libraries.
@Calypso694
@Calypso694 2 місяці тому
What development area, practice or job uses Rust? Serious question.
@esra_erimez
@esra_erimez 6 місяців тому
I've written code in C++ professionally for 10 years and hated every second of it.
@Skinface1000
@Skinface1000 6 місяців тому
When are the streams back?
Why i think C++ is better than rust
32:48
ThePrimeTime
Переглядів 259 тис.
I Hate Rust | Prime Reacts
23:00
ThePrimeTime
Переглядів 131 тис.
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Переглядів 43 млн
Не пей газировку у мамы в машине
00:28
Даша Боровик
Переглядів 1,7 млн
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Переглядів 297 тис.
why do they do this every time?
33:33
ThePrimeTime
Переглядів 34 тис.
You don't need libraries to write a game engine in C++ | OpenGL | Devlog
2:50
The Simplest Game
Переглядів 63 тис.
The Downsides Of C++ | Prime Reacts
21:23
ThePrimeTime
Переглядів 122 тис.
100 Seconds of Rust | Prime Reacts
10:38
ThePrimeTime
Переглядів 299 тис.
50 BILLION MESSAGES PER DAY WITH 32 ENGINEERS | Prime Reacts
14:58
ThePrimeTime
Переглядів 395 тис.
Rust is Not C
16:24
ThePrimeTime
Переглядів 188 тис.
The Worst Kind Of Programmer
19:15
ThePrimeTime
Переглядів 373 тис.
The Ultimate Tier Programming Tier List | Prime Reacts
26:57
ThePrimeTime
Переглядів 281 тис.
Rust for TypeScript devs : Borrow Checker
8:49
ThePrimeagen
Переглядів 209 тис.
How Neuralink Works 🧠
0:28
Zack D. Films
Переглядів 26 млн
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Переглядів 5 млн
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Переглядів 629 тис.