If you are interested in these topics, you can also follow me on Twitter :) twitter.com/terzi_federico
@TON-vz3pe2 жыл бұрын
Rust selling point 1. World's friendliest compiler 2. Challenging and feels good 3. No Garbage Collector 4. Blazingly fast 5. Strongly typed 6. Fantastic documentation
Жыл бұрын
World's unfriendliest compiler rather. Blazing fast is a lie. It's obviously trailing behind Zig or C. For Zig and C you can say blazing fast. Why are rust nerds always showing having garbage collector as a minus. That may be true to Java which creates spikes. Go's GC works differently. In the end it is always up to the developer how to use the language.
@nad9969 Жыл бұрын
@ LOL!
@kitgary4 жыл бұрын
Go is simple and easy to learn, developers can easy adopt and use it in production in a short time, I am now learning Rust and I think the learning curve is very deep even though I have been programming for over 10 years.
@FedericoTerzi4 жыл бұрын
Don't give up! Rust takes a while to grasp, but then it's well worth it :)
@rjmaas3 жыл бұрын
From personal experience once your Rust project compiles it often runs as expected. You spent less time debugging. Also runtime performance is jaw dropping. I've seen Rust version beating C/C++ by up to 30% Learning curve for Rust is steep but worth it as you spend much more time using a tool compared to learning how to use it.
@rendoesmath3 жыл бұрын
bruh even after 10 years of experience it seems hard for you?
@laxkeeper153 жыл бұрын
@@rendoesmath honestly I could see someone with more experience having even more difficulty shaking off some of the implicit assumptions a lot of other languages make, rusts ownership and borrowing concept are pretty different from most common languages. Beginner programmers are a bit more flexible so can probably pick it up easier. No need to shame.
@iorekby3 жыл бұрын
@@rendoesmath There are different types of programming though. Systems programming for example, where Rust would be a natural fit, isn't going to be an area most web devs are going to be familiar with. I often think people new to Rust aren't so much confused by Rust itself, it's rather that they aren't really familiar with the domains Rust is used in. Which I get. Sometimes people simply think Rust is like a cool new way to do an API or something. Rust is a bit like finding an advanced car repair manual in Russian. You might speak fluent Russian, but if you don't understand anything about cars, the manual will still seem confusing.
@nerothos3 жыл бұрын
As a beginner programmer, I've been enjoying Rust a lot. The strict compiler might seem annoying at first, but when stuff goes wrong (which is all the time), it's genuinely helpful unlike any other language I've tried. Writing code being time consuming isn't really a factor for me-I already aim to write verbose and easily readable code as my highest priority. The idea being spending more time writing code now = less time being confused later.
@FedericoTerzi3 жыл бұрын
I agree! :)
@datoubi2 жыл бұрын
Rust is not easily readable
@Alex-hr2df2 жыл бұрын
You probably are still a student. Write this comment of yours on your resume and good luck finding a job!
@louiidev4 жыл бұрын
Rust has quickly become my favourite language, I found it pretty easy to pick up as well since the docs are decent
@FedericoTerzi4 жыл бұрын
After grasping the fundamentals, Rust it's a very enjoyable language :)
@FedericoTerzi4 жыл бұрын
I've personally learned the basics of C++ first, then moved to Rust. That really taught me a lot about memory management and low level languages. After C++, moving to Rust was a breeze. You can also start directly with Rust, that depends on the amount of effort you want to put in :)
@ledues33364 жыл бұрын
Docs.rs is great
@FedJimSmith4 жыл бұрын
C++ 20 and beyond
@FedJimSmith4 жыл бұрын
@Vizman216 at least in comparison to cpp
@MarkusBurrer4 жыл бұрын
Go for Rust ;-)
@gcxs4 жыл бұрын
Rust to Go!
@MarkusBurrer4 жыл бұрын
@@gcxs that's true. You can use Rust to develop mobile apps for Android and iOS.
@tanko.spirit77544 жыл бұрын
that sentence is powered by Go
@JstJaybeingJay4 жыл бұрын
@@MarkusBurrer how?
@yigitgumus094 жыл бұрын
i didn't get what are you saying :D
@softpool12862 жыл бұрын
professional C developer and I've recently tried both rust and go. I can't get over how much I love go. it feels like a modern C to me. rust borrow checking and ownership makes sense as a concept but in practice is really rough for me to get right. one of my favorite things about both is they aren't "truly" OO. I think OO just adds so much abstraction and confusion, while things like C are much more straightforward. you have a piece of memory that contains data and you manipulate that data by accessing the memory. that data is not "performing" any actions itself like objects are thought to do. and for the most part both rust and go don't have that overly abstracted OO feeling!
@verified_tinker18182 жыл бұрын
I can't speak for Go, but Rust doesn't feel "OO" because it _isn't_ object-oriented. It's an amalgamation of procedural and functional programming (and, probably, some other aspects I can't name).
@nxfoobarbaz2 жыл бұрын
Exactly! Go is the new C :) I used to love C++, and Rust seemed super cool at that time. But then I switched to C and realized that Go is super cool :)
@yemyint97254 жыл бұрын
Take only one week learning to use the rust , wow. I been learning about half year and still going through.
@nathanielwoodbury26923 жыл бұрын
So true lol
@katarsloto42233 жыл бұрын
Says some one with GOs logo on his profile
@stardustbiscuits3 жыл бұрын
@@katarsloto4223 lol
@sebastiangudino93773 жыл бұрын
@@katarsloto4223 That explains it all
@zainthemaynnn3 жыл бұрын
I like how he mentioned the learning curve and getting your friends to use it, that’s my number one gripe with rust 😢
@baxiry.2 жыл бұрын
try zig
@CyReVolt4 жыл бұрын
I rewatched this for the first 12 seconds. :D
@FedericoTerzi4 жыл бұрын
Glad you liked it :)
@nikhilweee4 жыл бұрын
The comparison is unbiased. I can't believe it!
@ThePandaGuitar4 жыл бұрын
This is an amazing and mature unbiased comparison. Thank you so much!
@FedericoTerzi4 жыл бұрын
Thanks :)
@friend71203 жыл бұрын
Rust is adding ~14 language features a year. C++ adds about ~10. C adds about ~0.7, and Go about ~2. To quote Drew DeVault: “Go is the result of C programmers designing a new programming language, and Rust is the result of C++ programmers designing a new language”
@seanld4443 жыл бұрын
Just used that Drew quote like a couple comments above yours. Oops. Wasn't sure if I was gonna see it down here. I had initially thought about learning Rust, but then I realized just how insanely fast it's expanding (and how non-uniform the syntax feels), and quickly decided to learn Go instead. I'm really liking that choice so far. Go is an excellent language. Probably gonna replace most of my Python use cases.
@renatosardinhalopes60733 жыл бұрын
Wouldn't it be the opposite???
@friend71203 жыл бұрын
@@renatosardinhalopes6073 why would it be the opposite
@renatosardinhalopes60733 жыл бұрын
@@friend7120 Rust wants to be the new C from what I recalled. Don't see how C++ fits in here but GO wants to be the new C# (in their respective fronts)
@friend71203 жыл бұрын
@@renatosardinhalopes6073 I don't think the Rust team has ever said they want to be the new C. One of the 'founders' (forget his name) said that if C++ keeps improving, it'll negate the need for Rust entirely. seems a pretty clear indication that C++, not C, is what Rust is competing with Go is used in very different areas to C#, so i'm not sure about that comparison
@salmanmohammed88944 жыл бұрын
This is a very good unbiased objective comparison, I have not previously worked on either of the two languages but I have learned much about them here. This is high-quality content, keep up the good work. I hope this channel grows.
@FedericoTerzi4 жыл бұрын
Thanks :)
@kmtecltduk44754 жыл бұрын
Ideally Go should be compared with C# or Java and Rust should be compared with C/C++ . At end of the day for embedded systems what counts is how fast a executable runs on hardware. So looks like Rust could be a successor to C/C++ for embedded systems.
@porky11183 жыл бұрын
You might group these sentences in the wrong way: "Go should be compared with C#" OR "Java and Rust should be compared with C/C++"
@porky11183 жыл бұрын
I can agree to that. I really like rust, but I'm not totally sure, I should recommend it to beginners. But most languages beginners start with when learning programming, are pretty bad, like Java, C# are just bad languages, C, C++ are too low level, C++, Rust are too complex, and dynamically typed languages like python are difficult to use when wanting to teach about types. Go also was the first programming language I learnt after learning some application specific programming languages (GML) and some popular ones (Java, C++, Python). But because of the lack of generics, I didn't continue using it.
@guy-dev3 жыл бұрын
@@porky1118 C is not too complex. It's actually very easy to learn, but hard to master
@porky11183 жыл бұрын
@@guy-dev C is not too complex, but might be too low level for beginners. But I'd still recommend it instead of Java because of the simplicity.
@raffimolero643 жыл бұрын
@@porky1118 being low level makes it *perfect* for beginners, since it teaches you how a computer thinks.
@scottlott37944 жыл бұрын
Fair, balanced comparison. Thank you!
@FedericoTerzi4 жыл бұрын
Thanks :)
@theLionKing8743 жыл бұрын
I wanna ask youtube why this video has come in my recommendation list this late? It's a total life saving and enlightening video.
@WorstDeveloper4 жыл бұрын
I've used Go, Rust, C#, JS, Java and VB so far. Rust is by far the coolest language imo. Go and C# are on second place for different reasons. Go is simple and good for small apps, C# is great for large apps and if you want to do many different things, due to having a vast ecosystem. I'm building a web application with Rust right now. I chose it due to security and performance. All my benchmarks placed Rust FAR ahead of other languages. And Rust forces you to architect your applications in a safer manner, which is critical for my application, since it's dealing with customer data. :)
@FedericoTerzi4 жыл бұрын
I agree with you! :)
@madanmohatra71904 жыл бұрын
Go for small apps? Currently I am seeing lots of complex applications being written in go most notably docker and kubernetes and tons of server backends
@WorstDeveloper4 жыл бұрын
@@madanmohatra7190 The creator of Kubernetes said that he would probably have used Rust if he were to rebuild it again. They had to create a lot of workarounds for Go's limited set of features. I think they basically implemented their own hacky version of generics inside of Go.
@madanmohatra71904 жыл бұрын
@@WorstDeveloper 😂 😂 I found this on docker website Its creator Solomon Hykes cited Go's standard library, concurrency primitives, and ease of deployment as key factors, and said "To put it simply, if Docker had not been written in Go, it would not have been as successful." Looks like they made some good compromises
@WorstDeveloper4 жыл бұрын
@@madanmohatra7190 Well yes, Rust didn't even reach version 1.0 until long after Kubernetes had been released. So Rust was definitely not an option back then. Btw, I have nothing against Go really. Its a tool, just like Rust. But personally I see Rust as being a better tool for large applications that require high performance with a small footprint. I think I'll use Go more once they have Generics and better error handling.
@MrWilde3 жыл бұрын
You get a thumbs up just for the awesome intro. Love Your Work
@FedericoTerzi3 жыл бұрын
Thanks :)
@vectoralphaSec2 жыл бұрын
There is a reason Rust always tops the top most loved programming languages in developer surveys every year.
@theLowestPointInMyLife2 жыл бұрын
And a reason why nobody is using it for anything big
@klausklaus80992 жыл бұрын
@@theLowestPointInMyLife They use it in firefox, chrome and test it in the linux kernel.
@garymacdougall434 жыл бұрын
This is an excellent summary of both languages.
@FedericoTerzi4 жыл бұрын
Thanks!
@zyan9834 жыл бұрын
Wait a second, an unbiased comparison in 2020?? Impossible xD! Also, one more advantage I would give Rust, is secure due to it being utilised as a safe language.
@dieSpinnt4 жыл бұрын
Hello fellow programmer. I was directly assigned from the Rust community forums to mark your comment as "Unsafe". This is because you are using a reference to a raw pointer (The year 2020) in your statement. Otherwise I absolutely agree with you. Bon Appétit and cheers! Hehehe
@sandyz10002 жыл бұрын
About the memory management, unlike C/C++ it doesn't require any manual memory management it is build within the language itself.
@djpeterson74792 жыл бұрын
The biggest reason I prefer Rust to Go was only lightly addressed here: program correctness. I feel like Go falls into a lot of the pitfalls of modern languages such as default null values. Though Unit testing is always important, I feel that if your program compiles correctly in Rust your program has a much better chance of being correct than a lot of other languages out there. I'm also a huge fan of RAII which is something that Rust seems to embrace. I really thought with the advent of GCs that RAII would be considered antiquated, but apparently it's making a resurgence and I'm totally fine with that.
@thisisnotok21002 жыл бұрын
tbh the compile time checks of rust are such a huge benefit, I am having a hard time justifying any alternative that doesn't have these features. I think this is something we're going to see adopted in many new technologies, but the old ones certainly will never implement it.
@B34ST-SL4Y3R Жыл бұрын
Loved this summary. Thank you so much!!!
@Guy_Sa Жыл бұрын
I see go as a great language and a warmup for my transition from py/js to rust
@TechnologyBudda4 жыл бұрын
It doesn't sound like he grasped the real power of rust in his memory management section.
@williamestey72944 жыл бұрын
Agreed. On a team you can be pretty much 100% certain of the memory safety of others code so long as it compiles and they don’t have any unsafe blocks (the exception here being reference cycles in rare situations). And where they do have unsafe, it’s usually a small section of code you have to review. Same goes for multithreading (with a few exceptions such as dead lock) and type safety which are both even more mind blowing. Bye bye NPE.
@yuvrajagarkar89422 жыл бұрын
Loved the video.. I wanted to learn systems programming improving OS and tweaking libraries and all I was confused wether to choose Rust or Go But after watching this video I’m gonna go with rust
@FedericoTerzi2 жыл бұрын
For that use-case, Rust is definitely the best choice :)
@Beryesa.3 жыл бұрын
Wow, I really like the quality of content. Subscribed :D Topic is really nice presented.
@FedericoTerzi3 жыл бұрын
Thank you :)
@STiAT-DaSchurl3 жыл бұрын
The last sentence makes all the argument for me. The best tool for the job. I'm actually using both and I see both of them staying in my toolkit for a long time to come - both have great sides. For us it comes down to the question if it makes sense to write something in Rust or Go (or even another language, but we mostly develop in Go and Rust these days). For me they are not really comparable, despite you CAN write most things in either, Rust and Go, it does not always make sense to actually do so. The biggest problem for me was really getting up to speed in Rust. There are great resources out there - really great ones, but it still took me weeks to get to a level of feeling somehow productive with it. Gets easier over time and the more you learn the more you value Rust, but the first steps are way harder than in Go (where I was feeling productive within a day).
@evmsubway4 ай бұрын
Same here man…
@Youkakun4 жыл бұрын
The biggest advantage of Rust isn't the performance, it's safety. Once your Rust program runs... it runs. With Go a lot of debugging hours/days/weeks may follow and at the end Rust was even slightly more productive without annoyed customers.
@fathirirhas36094 жыл бұрын
I dont get why you spend lot of debugging in Go. For me, debugging in Go is the easiest among languages I ever used, easier than previous I used such js, java, C#, or even c++. Go errors are pretty straight-forward, to the point. I mean, weeks? debugging?, I think It's just from inexperienced dev.
@Youkakun4 жыл бұрын
@@fathirirhas3609 “It's just from inexperienced dev.“ - But that's the point. There're always new programmers who screw your code and rust stops them from making faults rather than Go which makes you hope a critical error doesn't pop up from a niche situation on product presentation.
@mrPsyx04 жыл бұрын
@@fathirirhas3609 They say experienced devs don't make mistakes. It's possible only when there's no way you can make a mistake. Using language with poor type system (C#, Java, C++, Go) will inevitably lead to some bugs in the future. On the other hand language with strong type system (Rust, Haskell) will eliminate mistakes by design. It's called `soundness`. You write your strongly typed code and know you won't ever debug it. You know noone ever will misuse it. You won't forget to dispose some resources. Code won't break when you will add new feature. There's no bugs after refactoring. You just code and it just works.
@fathirirhas36094 жыл бұрын
@@Youkakun Go has lower entry barrier and low learning curve for beginner. So beginners have lower chance of screwing code than in Rust. If you read in many testimony from companies who have adopted Go, they admit how Go is friendly to beginners, and also satisfying to experienced ones. Im not sure what kind of beginner of screwing code so bad, there's far more chance he/she will screw in Rust too.
@fathirirhas36094 жыл бұрын
@@mrPsyx0 Experienced Devs do make mistakes, it's lesser in Go. Are you some kind of expert saying those languages have poor type system?, Go is strongly typed languages in every references I read. I never bashed Rust, I know it's great language with great performance. But I'm tired seeing programmers are bashing other language, while he never/rarely used it and also inexperienced with it. From your statement, it's clearly stated that you somewhat never/rarely or even inexperienced dev. How can your program will be buggy, while beginner already creating things and run smoothly in their first tries. No offense, but this clearly come from inexperienced dev.
@PTM10083 жыл бұрын
Very helpful. It helped me take a very educated decision and stick to JavaScript.
@tjgdddfcn2 жыл бұрын
The bad ending
@DrNoxer2 жыл бұрын
Quick note, rust depends on libc, so it's not really a statically linked binary, it just links all dependencies except for libc. Go does not depend on this.
@SomeRandomPiggo Жыл бұрын
And Go still has smaller binaries!
@crimsionCoder423 жыл бұрын
Rust is excellent especially for operating systems, high-frequency trading, compilers, etc. I think Go will win in popularity for the exact same reason Java outpaced C then Python outpaced Java in popularity. As individual engineers, beauty lies in the flexibility and control you have over the language. However, unless you're coding for fun you're looking to get paid which means the company you work for has to make a profit. This means they need to outpace, scale, and develop quickly by having a simple code base that can be understood and added to as fast as possible. So seniors need to be able to spin up junior engineers and make them as productive as possible in the least amount of time. Rust is super fast and performant and beautiful as a language but the experience to the end-user is near as makes no difference vs go (except in certain situations as mentioned above). It's Darwinism a company that can scale faster while providing the same performance to the end-user in fewer lines of code or complexity will outpace a similar company with a similar product written in a more complex code base with more lines of code needed to do the same thing.
@joshuabaillie52612 жыл бұрын
rust still has its place as firms also aim to reduce costs, especially costs that scale with users. rust can provide less on cpu time and better memory usage for cloud computing & serverless infrastructure thus reducing costs by a factor of its own performance
@slyblood854 жыл бұрын
that intro was the best thing I've seen in 2021
@FedericoTerzi4 жыл бұрын
Glad you liked it :)
@xDELTAGIx4 жыл бұрын
Took me maybe week to learn rust, and since then I have been working on 2 projects a REST server for a social media website, and a Game server for low latency high player count systems in unity. They have both been a blast to work on and honestly once you understand the language I find I really don't need stack overflow and debugging is minimal in rust compared to even me working in python. Rust is really weird but awesome when it comes to development speed, it honestly feels faster than python which shouldn't be a thing, it feels high level, but i am counting functions in the nano seconds. Id really suggest trying rust, I have used django and flask for REST, and I wont be going back to those after using rust
@FedericoTerzi4 жыл бұрын
I definitely agree with you!
@baxiry.2 жыл бұрын
Can you share your repo?
@LordOfElm2 жыл бұрын
Go provides simplicity, unparalleled tooling, an excellent standard library, and insanely fast compile times that gives you rapid iterative development experience. The current iteration of the Go GC runs in parallel and the portion that causes pauses can be measured in nanoseconds. I haven't played with Rust yet since getting buy-in is way harder. However from everything I hear Go will get you to the complex errors faster, while Rust would help you resolve those errors faster if and when you reach them.
@jakobfrei11214 жыл бұрын
In the performance comparison at the and, you talk about CPU bound vs IO bound operations without using the name. ;) IO bound applications benefit greatly from some sort of parallelism, so your server doesn't block a whole thread while waiting for a database call or whatever. I'm not here to bash Go in any way, and from what I hear Go's concurrency model is one of the language's strongest suits. But as you say yourself, Rust shines here even more because of its strong compile time guarantees where the compiler catches the most common errors in multi threaded programming before they even get executed. And as everybody can confirm who ever tried to do concurrency in a language like Java, those bugs are among the nastiest you can have, as they happen so erratically. Therefore, I'd take a language as superior in which you can do concurrency in a safe manner - yet you're right, it comes at a cost, which is the learning curve.
@FedericoTerzi4 жыл бұрын
Agree! :)
@kesslerdupont60232 жыл бұрын
Learning Go right now but will definitely be learning Rust next.
@datoubi2 жыл бұрын
If you jump from one language to another, you aren't really gonna learn either of them. What you need is a project. And who know how long that project may take? By the end of it there might even be a new language built by Ai that's just too good to skip
@emanuelclur28114 жыл бұрын
Perfect video and your english is amazing. I'm not a native en speaker, and I usually have problems in order to undestand every word that I hear but you talk perfect. Nice video!
@FedericoTerzi4 жыл бұрын
Thanks! :)
@simoneinfante55344 жыл бұрын
You deserved the like just for the intro.
@FedericoTerzi4 жыл бұрын
Thanks! Glad you liked it :)
@meamzcs4 жыл бұрын
You don't really need to "be careful about memory management in Rust"... As long as you don't use unsafe (and there are no bugs in Rust) it will be 100% memory safe...
@FedericoTerzi4 жыл бұрын
You're absolutely right, but my point was slightly different: when I say "be careful about memory management", I mean that you have to actually think about memory management in Rust, whereas in GC languages you (generally) don't. For example, in Rust you can have ~6 different types of references, which means you have to actively think about the best way to handle resource lifetimes when developing (see the "Complexity" paragraph for an example: matklad.github.io/2020/09/20/why-not-rust.html )
@meamzcs4 жыл бұрын
@@FedericoTerziYes that's true in a way. Although i think memory management is only one aspect of what ownership and borrowing do.
@FedericoTerzi4 жыл бұрын
Yes, I think the greatest thing Rust offers is this sweet "middle ground", in which you do have to think about memory management by yourself, but in a higher (and less prone to errors) way compared to other low level languages such as C.
@davidknipe41134 жыл бұрын
Or another way of looking at it: Rust fails fast. So you do have to worry about memory management, as in you have to think about it, but there's not much risk of a bug actually getting into production.
@meamzcs4 жыл бұрын
@@davidknipe4113 when someone says "be careful" i think i can do something wrong so that something bad happens. That's not the case. Yes you need to think about it although you don't have to directly think about it but through Ownership which is helpful in more ways than just memory management.
@AlucardHV4 жыл бұрын
Why people keep comparing go and rust??? They are very different languages with different purposes
@wiktorwektor1234 жыл бұрын
Exaclty. It's like comparing truck to sports car, which is better. Answer depends on what do you want your car to use it.
@rafaelrosa38414 жыл бұрын
wrong, rust can do everything that go can, the oppositte is not true. The pick for go is just the learning curve and easy of use, is enough to choose go? Maybe.
@asm-ex1jw4 жыл бұрын
Because they have the same level of hype
@r.pizzamonkey73794 жыл бұрын
They're both modern languages with c-inspired syntax, and they both focus on concurrency. That's pretty much it as far as I can tell, kinda minimal but whatever.
@a.h.s.30064 жыл бұрын
Because they are the newest kids in town. People today compare Javascript to C++, despite the fact that they are both completely different beasts. That's because the comparison is in the difference, like: JS is used in web development while C++ is good for game design and etc. So the goal of the comparison is: Don't use C++ if you want to be a frontend developer. Same goes for Go and Rust: Don't use Rust in backend design, it's not its main purpose. In general, consider it like explaining the use of a hammer and a saw, you don't want to split that plank with you hammer don't you.
@dixztube2 жыл бұрын
Just started go coming from node and love it and it’s take about a week to get around most concepts. That is true. It took days. Hmmmm got me thinking I need to do a personal small project in rust.
@FedericoTerzi2 жыл бұрын
You will not regret it :) also, rust is great to write native node modules
@dixztube2 жыл бұрын
@@FedericoTerzi so I am! I’m still gonna help a close family member out with their company site and use go (the built in http library is pretty decent ) with react BUT I’ve been wanting a better way to find KZbin channels I’m subbed to and gonna build a backend with rust to a fire stick app to organize my yt videos better. Thanks for your channel gonna go thru it on my walk today if I can ever get my pulled hamstring healed lol (I’m on the floor painful morning lol)
@FedericoTerzi2 жыл бұрын
Sounds great! Good luck with your recovery :)
@ClaudioBrogliato2 жыл бұрын
In web development as long as the main cost is engineers' salaries then languages like Go are the tools to use, when the platform bill overcomes those costs then it is time to switch to a more performant language. As long as the requirements are met nobody cares if your app is a few ms faster.
@dylanadc44034 жыл бұрын
"Always use the right tools for the job" perfect conclusion
@JackMott4 жыл бұрын
its a tautology with no real information content, and often used to reinforce the idea that all tools have a use. probably some tools are just bad! though i don’t think Go or Rust are bad
@dylanadc44034 жыл бұрын
@Jack Mott I don't agree with your comment. Yes some tools are just bad and we shouldn't use them, that's why we should use the right tools, not all tools
@JackMott4 жыл бұрын
@@dylanadc4403 I want to know if I should use Rust or Go. Someone tells me "use the right tool for the job". I still don't know what to do. No information is imparted. What tool is right for what job is the question everyone has. And we have no rigorous answers!
@dylanadc44034 жыл бұрын
@@JackMott I understand what you mean but it depends! It depends of your needs, of your time, of your project... As he said in the video, Go is better for web services and Rust for high performance applications but both tools are good in general. As engineer we need to know these different tools, so we can make choices about it
@rafaelrosa38414 жыл бұрын
@@dylanadc4403 you still have no answer for the question. Probably most devs don't know "the right tool for the job". This is just a phrase that people repeat over and over again.
@esra_erimez4 жыл бұрын
By the way, I use C++
@ahsan_a4 жыл бұрын
i use nasm, normie
@esra_erimez4 жыл бұрын
@@ahsan_a Well said
@climatechangedoesntbargain91404 жыл бұрын
poor you
@climatechangedoesntbargain91404 жыл бұрын
@ozone o3 what has UI to do with OOP? What's your problem with Dependency injection?
@FrancescoCina4 жыл бұрын
Evaluating a technology based on how fast you can start with it, it's the best way towards a fast failure. Every experienced manager knows that the most expensive part of a software development process is maintenance. That's exactly the reason why Rust is a superior language in terms of costs for whatever medium/long term project. Simply said, Rust DESTROYS maintenance costs. After 20 years of Java/JS/Python/PHP/TS/Go/Whatever, I can affirm that web development in Rust is the most unbelievable programming experience I ever had with my team. Is reviewing code boring? Well, the compiler does 90% of the job for you...
@FedericoTerzi4 жыл бұрын
Thanks for the useful insight!
@willembielefeld7124 жыл бұрын
Why? I don't know rust much. How is it possible, that a compiler is able to solve maintenance problems? Is it some multi os compiling features or how can this be explained?
@naomiliu52014 жыл бұрын
Willem Bielefeld Strong type checking and static analysis is built into rustc. The compiler is strict about preventing issues like using a variable that’s out of scope, having multiple mutable references to a single value at once, prematurely freeing heap memory, etc. Lots of obscure bugs that would cost valuable development time are eliminated, which is useful for maintaining large projects where these kinds of things can cause problems down the road.
@willembielefeld7124 жыл бұрын
@@naomiliu5201 But doesn't other compilers do this aswell? I had issues with the go compiler alot, but i never had issues with my c++ compiler so far. I was always wondering, why some do better than others. I always thought, it depends on the best practices and how you structure your code. That is why i prefer OOP over FP. And i thought, that FP is the problem, why the GO compiler is not working as good as the C++ compiler. Never heard a compiler could handle bad programing
@naomiliu52014 жыл бұрын
Willem Bielefeld The most that GCC will do is throw an error for unmatched types, warn you about unsafe functions, or fail to parse malformed syntax. Rust’s compiler will analyze the lifetime and ownership of every pointer and variable you initialize, making sure that you’re not coding in such a way that will lead to a race condition or undefined behaviour. FP isn’t a problem, I would argue that it’s more scalable than OOP. Being able to abstract away from the idea of how your data “interacts”, like with nested inheritance chains, random methods, etc is powerful. Of course, proper code structure is important. But having a good compiler is the difference between your bugs popping up at runtime, or at compile-time.
@James-on1vy2 жыл бұрын
Not to mention, Rust can be programmed on bare metal embedded systems such as STM32 microcontrollers.
@baxiry.2 жыл бұрын
both
@danieleuchar54283 жыл бұрын
Top Quality Opening Intro
@gagaxueguzheng2 жыл бұрын
Rust is cool, I just started developing a new service with it. One thing I didn't like so far is that most tutorials or examples skip the unit testing part or just do very basic unit tests without any mocks. It took me a while to figure out how to unit test my database access stuff.
@FedericoTerzi2 жыл бұрын
If you want to know more about that subject, everyone recommends the "Zero to Production" book, which deeply covers this subject :)
@islapthebass3 жыл бұрын
Thank you handsome prpgramming mam, keep it up. I enjoyed your easy-going, hospitable demeanor
@FedericoTerzi3 жыл бұрын
Thanks!
@dinko.korunic4 жыл бұрын
4:17 Rust compiler doesn't produce static binary by default if it's using libc as target. A lot of crates don't work with MUSL libc as a target, so the claim about producing "static binary" compared to Go does not hold really.
@FedericoTerzi4 жыл бұрын
You're definitely right! thank you for pointing that out :)
@RefactoringRyan3 жыл бұрын
Thanks for sharing. Very informative
@FedericoTerzi3 жыл бұрын
Thank you!
@dupersuper10004 жыл бұрын
I don’t understand why people insist on comparing Rust with Go. They are such wildly different languages, and their performance isn’t even that similar. My guess is that they just happen to be interesting & popular languages that arrived on the scene around the same time. But that doesn’t mean anything in terms of their similarities. If the answer is “they can both be used for writing web servers,” then why not include literally every other language, like Clojure, or Pascal, or C? It’s really not a good criteria for grouping languages IMO.
@FedericoTerzi4 жыл бұрын
I definitely agree with you, they are very different languages, designed with different goals in mind. That said, why not compare them? Languages are nothing more than tools, and the more we spread information about their differences (and ideal use cases), the less fights we get over which of them is better than the other. Instead of "which", people should ask themselves "when" to use them :)
@dupersuper10004 жыл бұрын
Federico Terzi that’s fair, but this is hardly the first comparison between Rust and Go, and it’s clearly a trendy comparison to make. My point isn’t that we shouldn’t compare them, it’s that there is a huge number of people who think of these languages as inhabiting the same space, and it’s genuinely weird. Like it would be weird to act as if Ruby and C are related & worth comparing, aside from them both being languages at all. That’s how I feel about Rust and Go. It’s just apples and oranges...
@FedericoTerzi4 жыл бұрын
To be fair, the difference is obvious only once you document yourself :)
@dupersuper10004 жыл бұрын
Federico Terzi to be fair, at least you’re being fair ;)
@gabrielegatti23222 жыл бұрын
Really interesting! Thank you!
@FedericoTerzi2 жыл бұрын
Thanks :)
@terjeber4 жыл бұрын
To say that Rust has manual memory management is not strictly correct. It doesn't by default. It automatically handles memory, but not using garbage collection.
@sinister752 жыл бұрын
THis man deserves a subscritber
@wadecodez2 жыл бұрын
Low key if you turned those cutouts in the intro into stickers, I would buy it.
@FedericoTerzi2 жыл бұрын
Nice idea! Will look into it :D
@blank0013 жыл бұрын
In simpler terms Go is python with rocket boosters and nitro Rust is C without legacy code(C's decades old compatible code) and reduces the ways to mess your program.
@insertname54213 жыл бұрын
and then you have kotlin native, which takes the cake
@martonkardos80943 жыл бұрын
Go is by no means similar to Python. I work as a data engineer and I would probably loose my fucking mind over having to work with Go. It's great for web backend or CLI-s but I definitely wouldn't use it in the same contexts as Python. To me it seems more like a smarter version of Pascal than anything else.
@davidowens95973 жыл бұрын
I would say that Go is like a 21st century version of C.
@hailuong92952 жыл бұрын
@@davidowens9597 nope, Go is very different, it has runtime, has garbage collector, has a little OOP mess around, can't call C directly. Compare to Rust which can use anywhere C exist
@davidowens95972 жыл бұрын
@@hailuong9295 Right. That's why I said it was a 21st century version of C. It's like C with modern features like garbage collection added. One of the creators of Go, Ken Thompson, was also a co-creator of the B language, which was expanded to become the C programming language.
@swibay4 жыл бұрын
Don't waste your time on these time consuming comments!!! Just watch the video it's pretty straight forward. Didn't intended to make who is a winner, but where you should use each of the language. And that's is pretty awesome! Somehow the title of the video is misleading.
@ramkumarr17253 жыл бұрын
As an architect, and with Microservices, a team or individual can pick the language and technical stack they want for their problem. As you say, Go is for concurrency and Rust is for system level and performance intensive application. I know Java, Typescript, R and Python3. If you see R programs they are memory intensive but concise whereas python is more descriptive yet faster.
@FedericoTerzi3 жыл бұрын
Definitely! In fact, microservices were introduced mostly as an organizational tool, as different teams can work (mostly) independently from each other
@donato6854 жыл бұрын
Very nice, clear and interesting overview. I'd like to post one question: which language do you evaluate better for industrial automation or embedded devices, where the most important requirement is real time performance, reading inputs from sensors and driving HW outpus? Thanks
@FedericoTerzi4 жыл бұрын
Thanks! I don't have any experience in that area, so my opinion doesn't really matter. In that space, probably the good old C, C++, Zig and Rust are the best choices
@donato6854 жыл бұрын
@@FedericoTerzi C, C++ and Python have well known and longly tested history in this fields. My question is related to some innovative application, as for example in IOT. Anyway: thanks again for your video!
@GolangCafe4 жыл бұрын
Great comparison Federico! Esp. funny intro xD
@FedericoTerzi4 жыл бұрын
Thanks :)
@BarnabasTYT3 жыл бұрын
thank you! very nice and neat video!
@FedericoTerzi3 жыл бұрын
Thanks! :)
@cerulity32k2 жыл бұрын
I like Rust because its biult to be really low lever, but with third party crates you can create robust desktop apps. I made a Geometry Dash macro clickbot that places clicks wherever a macro clicks, then spits out a .wav file. 12 thousand clicks per second, and it only took 1 second to finish. With many crates adding features present in high level languages, its possible to build great things with Rust.
@AveN7ers3 жыл бұрын
I think there's a typo at 1:45. It should be let sublist = list.filter(x => x % 2 == 0)
@efficientgaming46032 жыл бұрын
Hey I had that same robot when I was a child the one on the left. Do you maybe know how can I buy it? :D
@FedericoTerzi2 жыл бұрын
Here we go :) wowwee.com/robosapien-x
@gimcrack5554 жыл бұрын
Love both Go and Rust. I'm mostly a programmer dabber, then a very good one. I just enjoy learning at my pace, just to do the simple things. Jack of all trades, master of none. Only programming language I can say I really know is Lua. But I'm learning Python, C and Javascript. Which Javascript is the second one I can say I'm getting to know very well. I dab in many other's, but I say I'm the strongest of the one's I mention here. Not sure if I'm going to be good at all of them. But I'm going to give it my all for sure.
@whoopsimsorry25463 жыл бұрын
Nowadays with all the code that exist all the problems can be solved by most programming languages. I'd pick rust a thousand times though just because of what it stands for and how comparable it is to both old low level languages and new more abstract ones.
@dhananjaykumarsingh4594 Жыл бұрын
Go's Powerful coroutine support can make it fast also and In Go a simple program can be fast you don't need heavy optimization and there are services like cockroach db dgraph docker and kubernetes are made in Go
@Christobanistan2 жыл бұрын
I'm trying to decide, I don't want to learn both, but I want a language that is fast for game dev and has a quick compile time. Go's got a garbage collector, which kills runtime performance, but Rust's compiler is so damned slow. I wonder, is it getting quicker? Maybe they could introduce a 'design time' mode that is quicker.
@superzazzaful4 жыл бұрын
In Italy both of these language are not popular yet.. is very hard to find a company that use go, even harder for rust!
@FedericoTerzi4 жыл бұрын
That's true indeed! I think that it mainly has to do with the fact that most programming here is done for enterprises, which are always slow to adapt to new technologies (in fact it's even hard to find something not Java/ C++ or .NET related...). If you move to the startup ecosystem though, things get more interesting :) Also, nowadays remote work is growing pretty strong, which opens up a ton of possibilities (for example, I'm working part-time as a Rust consultant for a foreign company)
@superzazzaful4 жыл бұрын
@@FedericoTerzi yes I agree. The only way is to work with foreign companies expecially the american ones.
@FedericoTerzi4 жыл бұрын
@@superzazzaful Agree, that would be the ideal situation! Hopefully as time goes by this will be easier and easier
@sharkpyro934 жыл бұрын
lavoravo con java 8 e spring boot, ho cambiato lavoro e adesso sto in ballo con le jsf e java 6, rip me...non è possibile che in italia è solo java/c++, quasi quasi passo a fare front end
@Omar-ic3wc4 жыл бұрын
@@sharkpyro93 settore web(in Italia) php è ancora fortissimo, tra l'altro vorrei aggiungere che da noi c'è molta confusione e incertezza se puntare o no su nuove tecnologie, non si trovano praticamente nessuna richiesta per rust, go.. a malapena si trovano full stack Javascript.. Come già detto in precedenza dal collega molto meglio lavorare con aziende estere piuttosto che quelle nostrane
@stanrock8015 Жыл бұрын
Correct: Go was designed to replace C++. Per Rob Pike. C++ developers didn't bite however.
@MaxCoplan2 жыл бұрын
Something that you missed is that the reason Rust is more popular for FE web development is because the Go runtime is a whopping 1.3 MB -- excluding it from many FE usecases outright. Rust on the other hand is closer to 10kb
@MaxCoplan2 жыл бұрын
Not to mention the Go GC, while fantastic for most cases, can conflict with the JS GC and cause a lot of trouble
@sheracore91903 жыл бұрын
Tnx it was good video and helpful
@loknathshankar54232 жыл бұрын
Debugging and interop support with c/c++. Would good to know.
@FedericoTerzi2 жыл бұрын
As far as my experience goes, the debugging situation is pretty good on Linux, less on Windows
@grim.reaper4 жыл бұрын
Awesome comparision. Subbed 🥰
@FedericoTerzi4 жыл бұрын
Thanks :)
@Lyrik-Klinge3 жыл бұрын
very interesting, THANKS!
@valizeth40734 жыл бұрын
Python doesn't traditionally use a garbage collector while it rather uses reference counting internally. It's somewhat similar to if you were to wrap everything into a std::shared_ptr in C++.
@FedericoTerzi4 жыл бұрын
Yep, my choice of words there wasn't great... Python use a combination of reference counting (the main mechanism) and garbage collection (to handle circular references)
@jackwattanapong61494 жыл бұрын
Thanks for useful comparison
@FedericoTerzi4 жыл бұрын
You're welcome :)
@willinton064 жыл бұрын
I go C# for high level and Rust whenever I need something lower, they’re both dealing with WASM very often so they’ll both be very relevant in the future
@NikhilKumar-ry7eg4 жыл бұрын
loved it! how about go vs scala comparison.
@FedericoTerzi4 жыл бұрын
Thanks! I'm not really prepared in Scala though :)
@uuu12343 Жыл бұрын
Hi! For shellscripting, is Golang better at that?
@x87alpha12 жыл бұрын
Just a correction, rust does not "provenly" guarantee thread safety. It's not proven in a mathematical term, so it's still possible to run into concurrency, dead locks, etc when using rust. It's just harder to get into those when using rust vs other languages.
@FedericoTerzi2 жыл бұрын
Indeed! Though one might argue that it's very hard to prove a program runtime "mathematically", as there are a number of assumptions we are making about hardware not failing which are not really provable (even just a cosmic ray could cause a bit flip in a real system)
@x87alpha12 жыл бұрын
@@FedericoTerzi I meant a compiler theory point of view. The compiler provenly guarantees syntax correctness for instance, it's impossible to compile if the syntax is wrong. But it's still not proven that any rust program that compiles is thread safe.
@FedericoTerzi2 жыл бұрын
Interesting, thanks for sharing!
@x87alpha12 жыл бұрын
@@FedericoTerzi there is still a benefit in rust tough, because if you fall into some edge case where you run into thread safety issues, then the rust compiler team would take it as a bug in the compiler. As opposed to C++ or other languages where you'll be on your own.
@abdullahabd76774 жыл бұрын
I never realized this channel is owned by the espanso's developer!! Dude you are awesome!! Edit: I am surprised that you didn’t advocate Rust considering espanso is one of the best of program written in rust.
@FedericoTerzi4 жыл бұрын
Thanks! :) Well, I wanted to keep the video as fair as possible, even though I prefer Rust :)
@himujjalupadhyaya42964 жыл бұрын
I found Nim to be better than both. Let's talk about this again in 2021-22. Nim v1 was released in 2019. So, let's wait a few more years and I would love to see this discussion again. Plus JavaScript backend comes out of the box and just works. Anyways, sorry for being out of context. Out of the two. I will choose Rust over Go personally. Cargo and C ABI is something I love. Plus it has so many less runtime errors! But yeah. It is more verbose and hard to learn!
@FedericoTerzi4 жыл бұрын
I heard good things about Nim as well! As you said, it's probably too early to make any conclusion about its future, but we'll stay tuned :) I prefer Rust over Go as well, but it mainly depends on what you have to do... Cheers :)
@himujjalupadhyaya42964 жыл бұрын
@@FedericoTerzi There are so many choices today. It makes everyone confused! I am also in future gonna give you one in this case. Lol. working on something called ekscript.com (Shameless Plug!) BTW Your videos are awesome. I recommend every Rust beginner to your channel. Keep up the good work!
@FedericoTerzi4 жыл бұрын
@@himujjalupadhyaya4296 That's impressive! Great work, seems very promising :) > BTW Your videos are awesome. I recommend every Rust beginner to your channel. Thank you :)
@meamzcs4 жыл бұрын
Isn't Nim GCed too? Which wouldn't allow it to be a full C/C++ replacement like Rust could be.
@himujjalupadhyaya42964 жыл бұрын
@@meamzcs GC is the default. You can opt out of GC and get manual if you want. Also there is the option of opting into an implementation of ARC that also handles Cyclic references. I found cyclic referencing a mess in Rust due to my Rust inexperience.
@samwight4 жыл бұрын
Rust does not have manual memory management by default, the ownership system manages the memory for you. The Rust compiler isn’t “very good at catching memory errors”, it makes it *impossible* to have memory errors or memory-related security vulnerabilities so long as you’re following the ownership rules. There is an area of Rust called unsafe Rust that lets you manage memory by hand, but it’s highly recommended that you avoid using it as much as possible.
@FedericoTerzi4 жыл бұрын
Good point, perhaps "manual memory management based on ownership and borrowing" wasn't the best way to describe it. That said, I did my research before making the video, and many developers described the process as manual (see: pcwalton.github.io/2013/03/18/an-overview-of-memory-management-in-rust.html). It really comes down to how you define "manual", do you have to call free() to have a manual memory management system? I could argue that by just deciding where the scope of the variable ends, you decide how long that chunk of data will stay in memory (as you just get an implicit free() call when out of scope), therefore making it manual. Regarding the second part, I always prefer to avoid strong claims such as "impossible", as we live in a complex world :) For example, most of the standard Rust library is built on top of unsafe blocks, so (in very very rare circumstances), you could still get a memory error even if you never used unsafe yourself. Saying that it's impossible to have memory errors is pretty much the same as claiming that a program is completely bug-free, hard to say :)
@empijei4 жыл бұрын
If you consider memory leak a memory error, then no, Rust still has memory leaks, which are much less frequent with a garbage collector. That said Rust also has race conditions, as documented here: doc.rust-lang.org/nomicon/races.html. The only thing it prevents is memory corruption of a certain specific family, but not all of them.
@yvrelna4 жыл бұрын
@@FedericoTerzi "you just get an implicit free() call" That's pretty much what garbage collector or reference counting does.
@dyroblesmercedes4 жыл бұрын
Like for the high quality intro
@FedericoTerzi4 жыл бұрын
Thanks! Glad you liked it :)
@rahulagarwal968 Жыл бұрын
For backend for a Flutter mobile application, Will you prefer Go vs Node js ?
@FedericoTerzi Жыл бұрын
Node + Typescript is usually a safe bet :)
@elderofzion4 жыл бұрын
both docker and kubernetes are written in go. i wouldn't call those simple or small apps/services
@FedericoTerzi4 жыл бұрын
Fair point!
@lawrencedoliveiro91044 жыл бұрын
Here blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f is a significant deployment originally done in Go, which they are switching to Rust.
@baxiry.4 жыл бұрын
@@lawrencedoliveiro9104 rare case. The exception confirms the rule. He does not deny it.
@lawrencedoliveiro91044 жыл бұрын
Also consider that the Linux kernel developers are considering allowing Rust code to be included. But not Go. Also, this: www.zdnet.com/article/microsoft-why-we-used-programming-language-rust-over-go-for-webassembly-on-kubernetes-app/
@mrPsyx04 жыл бұрын
Though kubernetes devs had to reinvent objects due to exponentially growing complexity of the system just to ease it a little. Lack of language expression made them suffer a lot. That's the point: easy languages only suitable for easy tasks. Take Python and Go. They are really easy to start. They are hiding a lot of problems from you. It's pleasant to develop small apps when your brain is still capable to grasp all project structure and you remember all caveats. When your project will grow to the size your brain can't handle you will notice some problems appearing.
@PhilippeCarphin4 жыл бұрын
Your stuff was interesting, based on your comments on how programming in rust is a very pleasant experience, I've decided to learn it. You're doing a lot of cuts while you're moving your hands. I usually don't notice when video creator cut the pauses out of their video but it was enough to distract me with this one.
@FedericoTerzi4 жыл бұрын
Thanks for the feedback! I'm definitely working that aspect of my videos, hopefully it will get better :)
@bjorn1204 жыл бұрын
Really well explained. Well done. I personally equally like C++, Go, Rust. Amazing tools, each in their own specialty.
@FedericoTerzi4 жыл бұрын
Agree! Each of them has their place :)
@Djellowman3 жыл бұрын
Very good video
@mrme56943 жыл бұрын
He Federico. Hope all is well. Is Terzi an Italian word? We have it in Turkish, too. Maybe it's a loan word from Italian. It means tailor.
@FedericoTerzi3 жыл бұрын
Hey, yes "Terzi" in italian means "thirds", like with fractions :)
@mrme56943 жыл бұрын
@@FedericoTerzi thanks for replying. It makes sense to me :) have a good day.
@jawad97574 жыл бұрын
I've been learning go for a while but I can't wait to get started with rust once I am proficient in c++
@FedericoTerzi4 жыл бұрын
Your efforts will be well rewarded :)
@jawad97574 жыл бұрын
@@FedericoTerzi thanks dude, I've learnt soooo many things during this pandemic: PostgreSQL, more advanced nodejs, golang, c. I like to learn as many things as I can, and I want to branch out into microcontrollers and circuitry one day (probably the first web dev that can handle hardware and low level stuff 🤣)
@FedericoTerzi4 жыл бұрын
That's great to hear! Your knowledge is always a good investiment
@jawad97574 жыл бұрын
@@FedericoTerzi indeed
@TBaguette4 жыл бұрын
I advise you to start learning Rust asap : if you're learning C++ along Rust, Rust will help you manage memory as correctly as possible so you'll then be able to apply that knowledge with C++ and avoid a big amount of memory bugs from the get go. If you're fine with learning two languages at once, definitely do that.
@fathirirhas36092 жыл бұрын
After sometimes using Go, I realized how unsuitable Go for backend services are. Go is so simple it's lacking. It lacks many language features exist in other languages to power you up writing backend business logic. If you look at many great companies employing Go, they are not employing it for writing their core system or business logic, but instead they're employing it for tooling their infrastructure and devops. Then I ask my self: "Who write business logic in Go?", The more proper usage of Go are in realm of tooling supporting your core system, infra, and devops, it also great for serverless arch, load balancing, and worker, But for the core system/services I prefer Rust over Go now and planning investing in Rust for now.
@Jaxusek2 жыл бұрын
and how did it pay off?
@hashirventhodi3 ай бұрын
Hi bro. how is it going?
@baaaanaaaanaaa4 жыл бұрын
Great objective comparison
@FedericoTerzi4 жыл бұрын
Thanks!
@____-gy5mq4 жыл бұрын
In the deployment part, did you mean "ahead of time" in the place of "static"?
@FedericoTerzi4 жыл бұрын
A different choice of words might have been better, with "static binaries" I meant "statically linked binaries", which is the case in Go but not in Rust (by default), which produces dinamically linked binaries instead. Sorry for that :)
@____-gy5mq4 жыл бұрын
@@FedericoTerzi Hmm, I didn't know rust used shared libraries by default. Thanks for that.
@FedericoTerzi4 жыл бұрын
I didn't know as well! One of the viewers pointed that out in the comments: doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html
@aYMKRDVC4 жыл бұрын
i'm finding alot of people with the same name as me holy shit