Тёмный

Python, Rust and Why You No Longer Need C 

Isaac Harris-Holt
Подписаться 15 тыс.
Просмотров 15 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 148   
@pierreollivier1
@pierreollivier1 Год назад
I agree with your take for the most part, memory safe languages are undeniably the future, but at the same time I don't really understand the critique of C as being less readable, I'll admit that C is far from perfect, but I don't see where the readability issue come, if anything I would even argue that C is less obscure than rust at time. Nonetheless great video.
@foxwhite25
@foxwhite25 Год назад
At least rust std doesn't have function name like scalbn and have good names, tell me what scalbn do without searching if you see this the first time.
@foxwhite25
@foxwhite25 Год назад
You got a integer return value? Oh wait sike it is actually a error code, and now you have to search through age old documentation to find just what do it means.
@pierreollivier1
@pierreollivier1 Год назад
@@foxwhite25 of fair enough, but nobody is preventing you from writing those functions, or using more modern C library. Everyone knows that the C std is terrible that's no secret
@pierreollivier1
@pierreollivier1 Год назад
@@foxwhite25 you can use enum for, that and _func_ macros, and assert, and a lot of different tools to bypass that. But I do agree that rust error handling is light years ahead of C
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
When I said readability, I included the ability to parse the code and grok what's happening in that definition too. I find that C can be incredibly difficult to understand as someone who isn't a low-level developer. You have to remember that this video is mostly targeted at folks who write Python, and I'd argue that Rust would be easier for them to pick up and become productive with than C. Especially for writing extensions.
@rj7250a
@rj7250a Год назад
Bjarne Straustroup years ago also said that C is obsolete, because you can just convert your C code to C++, wich have more features. Today there still many codebases written mostly in C, like the Linux kernel and MacOS kernel. Fortran also was said to be obsolete, but still, no language beats it in scientific computing at being super fast (not even C). C is not suitable for huge codebases where security is critical, like web browsers, that is why Rust was created, but for small-medium codebases or where memory safety is not critical, C will take 20-30 years to be replaced, i have seen Rust codebases, and like one 1/3 of the code is there just to workaround the borrow checker, like RefCell, Rc, lifetime annotations, that is why i did not bothered to continue learning it. Also most Rust newbies comes from Python or JavaScript, they just are not used to low level stuff, that is why they think that "manual memory manegement is spooky". The solution is to just do less dynamic allocations, thus using less pointers, it will make your code safer and faster. You can not code C with a JS mentality, where you can just do dynamic allocations as much as you want. I have seen C codebases with like 20k-30k lines, using like 20 pointers or less. You have to group and allocate similar data together, instead of doing many tiny allocations. Read about Data Oriented Design. C is mostly a fine language, it only needs Quality of life improvements, not a radical change in design. The only thing in C that i miss from Rust is generics, null safety and vectors. But i can get 2 of those by renaming my sourcefiles to .cpp . Rust at the moment is overhyped in my opinion, like Ruby in 2005. I will consider it later, when Rust becomes more mature.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
That's a totally fair assessment! I'm not claiming that C or C++ are going to be replaced by Rust completely - I'm just arguing that they'll be replaced by Rust for writing Python extensions. As you said, lots of Rust newbies (myself included!) come from garbage collected languages like JS and Python. That's precisely why Rust is so excellent for this niche use case.
@rj7250a
@rj7250a Год назад
@@IsaacHarrisHolt That is 1 area where i think Rust excels. It is more friendly for high level programmers, if they want to write faster code. But to low level programmers like me, C and C++ still fine for most applications, but they should be replaced where security is critical.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Out of curiosity, is there anything PREVENTING you from switching your C/C++ work to Rust other than language familiarity? I'm interested in what's keeping you where you are
@rj7250a
@rj7250a Год назад
@@IsaacHarrisHolt that is a big reason , i know that Rust code can be easy to read if you have experience, but still too different to me. The main reason is really maturity, there is lots of Rust libraries/frameworks, but most stil pre-release and unstable, you can not write good software if your tools have breaking changes every month and are full of bugs. You can use Rust bindings, but they can introduce more bugs and problems, so not the best solution. But C was also not mature in the 80's, let's be fair. So i still keep a eye on the Rust ecosystem to see if it is getting better. So far, i am not willing to take the risk.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Seems fair!
@Endelin
@Endelin Год назад
How old does Rust need to be before it isn't "new" anymore? 😂
@ArachnidAbby
@ArachnidAbby Год назад
About 50 years old
@nevokrien95
@nevokrien95 Год назад
Its more about python being old actuly. You dont write in python to do python code. This entire languge is just a glorefied api for c pakages. Like pytorch sklearn numpy etc. And all of these interface to c
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Or FORTRAN! Also Rust is relatively new to the Python world. Tools like maturin and PyO3 are fairly recent, comparatively.
@oboynitro
@oboynitro Месяц назад
😂😂
@zhivkomarinov5442
@zhivkomarinov5442 Год назад
C is not a complexity language. C is the simplest language that provides full control of the hardware. I agree that the same app will be created faster in Rust, but in C it will be quicker and more memory efficient. It depends of what king of app you are working on. In the most low-level software, C is irreplaceable.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I'm not arguing that Rust will replace C completely, just for Python extensions! And C isn't complex from a syntax standpoint, but for a high level Python programmer, it can be difficult to get your head around manual memory management, especially for more complex data structures
@lemna9138
@lemna9138 Год назад
​@@IsaacHarrisHoltif you are writing rust you will have to learn the same memory model anyway. You *have to* understand the memory model in order to be able to write rust code without constantly running into the borrow checker. Rusts borrowing mechanism doesn't come out of thin air, it's a logical continuation of going from malloc/free in c to new/delete in c++. If you don't understand pointers and why they behave as they do it will be a bigger challenge to start with rust because of everything that has been built on top of the simple c base of old.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
You're right - you will need to understand some aspects of memory management. However, Rust holds your hand a lot in this regard - the compiler is a lot more advanced and the error messages are unbelievably awesome. Also, Rust forces memory safety by default, so having a safe program is generally opt-out, whereas in C, in the vast majority of cases, it's opt-in. You have to spend time thinking and checking over your code to make sure everything is safe. Sure, there are external tools that can help, but since they're additions and not language features, they'll never be as well-integrated.
@lemna9138
@lemna9138 Год назад
@@IsaacHarrisHolt Of course, the issue is that rust hides almost all of the things you need to know about pointers, heap and stack in order to be able to understand the error messages it gives. It's excellent for making stuff in but it is a truly awful experience for new programmers, especially those without a background in c(++) and because the overlap of [python devs who don't know rust] and [python devs who have a background in c(++)] is very small, the target audience and the people who will have the worst time learning rust I'd rather they segfaulted a couple times learning go or c because they'll simply have a better time learning them.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I think your first point is EXACTLY why Rust is great for Python extensions. The people who will find this video helpful will mostly be people who want to replace a small portion of their code to make it run faster. They won't be building out complex applications in Rust (most of the time), and knowing about the stack/heap is probably useless to them. Let's face it, if you're running a Python program, memory isn't your primary concern. For this purpose, a little hand-holding goes a long way towards getting things done quickly. Most people will switch to Rust to speed up a small bit of their code and then go right back to Python. Their goal isn't to learn the language in its entirety. Learning memory layout and usage is definitely important for other things though! And I do agree that you'll have a much better understanding of it all after using C/C++ for a while than Rust, so I agree with you there :)
@SimGunther
@SimGunther Год назад
Prompt engineer: I need a YT channel like No Boilerplate but 20% less British and 30% more python AI: ok _Creates this channel_
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
And 80% more terrible memes! But yes, Tris' channel is a big influence on this one. He's one of the reasons I picked up Rust in the first place, actually!
@fabricehategekimana5350
@fabricehategekimana5350 Год назад
Great video! You know there is also mojo that look promising. It has an ownership system, type system and optimized speed that can be fine tunned depending of the hardware. It copy many idea from rust and has the simplicity of the python syntax. (Some of his features are still in developpement though) So I think it will be one of the greatest language existing if it keep all his promises ! But I am still a rust user to be honest
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Yes! I've signed up to try Mojo, and would love to do a video on it in the future. I'm not sure how useful it'll be though - I'm not a data scientist so I won't know any good uses for it, and won't be able to properly benchmark it.
@hwstar9416
@hwstar9416 Год назад
bro unironically said Rust is simple and C is complicated. I can't with with these Rustaceans anymore 😭
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Rust is simple to get RIGHT 😉 it's also likely to be more familiar to Python Devs, who are the target for this vid :)
@hwstar9416
@hwstar9416 Год назад
@@IsaacHarrisHolt rust isn't a simple language. That can be seen by looking at how many constructs the language has. Compared to C, Rust is very complex.
@RobertFletcherOBE
@RobertFletcherOBE Месяц назад
@@IsaacHarrisHolt I would have said harder to compile wrong.
@ejay4032
@ejay4032 Год назад
Zig is a the real C replacement, While Rust is the C++ replacement.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
In general terms, I agree! But specifically in the case of Python extensions, I think Rust can replace both. Despite the learning curve, it's a lot quicker for a Python dev to become productive in Rust than either C or C++. At least, that's what I've found from experience.
@ejay4032
@ejay4032 Год назад
@@IsaacHarrisHolt I also agree with you. I tried learning Rust at a time but was overwhelmed by it. Writing Python DLLs with Zig was extremely easy. Maybe it's because I am not that good a programmer but Rust is hard!
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Rust is definitely quite tricky to get a handle on! I do really enjoy it though
@MrOnePieceRuffy
@MrOnePieceRuffy Год назад
I don't dislike Rust, I just don't see a real reason to learn this language, but I would others give the advice to learn this language aswell. But C isn't the Backbone of Python, it's the Backbone of our Computers, Python is just a garbage product from it, the world didn''t need and used by People who can't actually code. Beside that, C will go no where regardless. In Embedded System, you don't want a safe language, you want a fast, high scaled optimized program, so you have to do it in assembly with handwork. Since nobody likes assembly it's really handy that C is just a Super-Assembler and you actually can do this Job with branchless programming and a C Compiler. Somehting which Rust can't serve
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I vehemently disagree that Python is a useless garbage language. I know many fantastic Python programmers who excel at what they do, and could program circles around most people in ANY language. And I'm not saying Rust will go away forever, I'm saying it's likely to replace C/C++ for writing Python extension libraries. C isn't in danger of being replaced by Rust. It's in danger of being replaced by Zig, though.
@MrOnePieceRuffy
@MrOnePieceRuffy Год назад
thanks, that makes immidiatly more sense.. So the Video was just "my Language is so slow that It needs a fast backbone and i praise another language which can replace this backbone, because my actual language, stays being gartbage" 100% agree in this case. I also agree on the zig part
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Again, Python isn't garbage. It's designed for developer speed over processor speed. The low level extensions are created to try and bridge that gap
@twothreeoneoneseventwoonefour5
"Remember that language? That one language..." "What language?" "Ah, the Python extension language, Rust, of course" "Oh, I see, the one that improves Python?" "Yeah, yeah, the one that revolutionizes Python". This really hurt my ears.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Interesting! I'm curious to hear your take on all this
@twothreeoneoneseventwoonefour5
@@IsaacHarrisHolt I understand that you have a Python-centered channel, but I just found it very disappointing that you talked about Rust like it is some kind of "just a nice little language that improves Python, no big deal". Rust has been a very interesting, popular, loved language, made for general purpose programming, system programming and pretty much anything you can think of (even web frameworks, wasm). It was added to linux kernel. LINUX KERNEL, of all places. Maybe you didn't mean to do so, but your video just makes the impression of "Rust? Oh, the Python extension language?" (at least for me). Especially for people who are seeing your channel for the very first time (me), it seems kind of triggering. You probably need to make it a little bit more obvious somehow about the topic of the video and how your channel is a Python channel, not a general code/programming channel. I clicked on this video thinking it will compare these 3 languages separately (weird comparison but what else could you think of?) and equally, so it was confusing (at best) to see Python being the main topic of the video. I see you have a python tag, but you can't see any tags when this video gets randomly recommended.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Ah, I see where you're coming from! Yes, my channel is primarily Python focused, so this video does have a bit of a Python spin to it. Don't get me wrong though, I made this video (and my previous Rust one) because I LOVE Rust. I want to make more content around it, and that will probably have a Python skew initially, but may move away from that at some point. I don't actually use Python day-to-day anymore, so at some point I'll have to start producing more general programming videos anyway
@pedromunoz2337
@pedromunoz2337 Год назад
C or Rust, the real question is why Python since it obviously cannot handle what people are trying to use it for
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Python is great because it's easy to use, and most people who write Python will make extensive use of low level extensions without having to actually write them. That's part of the beauty of the language
@AlFredo-sx2yy
@AlFredo-sx2yy Год назад
@@IsaacHarrisHolt C is great because it's easy to use, and most people who write C will make extensive use of low level libraries without having to actually write them. That's part of the beauty of the language.
@0e0
@0e0 7 месяцев назад
i'm so excited to learn rust to make bespoke python extesions now ha wicked!
@IsaacHarrisHolt
@IsaacHarrisHolt 7 месяцев назад
Let me know what you make!
@denizsincar29
@denizsincar29 Год назад
rust is great but so young. I couldn't find a stereo sound library that is easy to use and not buggy. just one solution was to use rodio, but it has spatialsink problems.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
It is quite young, but it's maturing quickly! It's quite an exciting language to keep up with
@mishaerementchouk
@mishaerementchouk Год назад
It’s a bit overly optimistic presentation. Say, one needs to print the next number after the found n-th prime number (the program is not entirely correct as it doesn’t count 2 as prime but this is irrelevant). The Python program is basically good to go, requiring only one or two lines of code to add to the listing in the video. The Rust program is missing quite a few steps. Even if we rewrite it to drop the dependency on the extra crate. Out of the C, Python, and Rust programs, the latter would definitely look the most complex. Curiously, a Julia version would indeed look quite similar to the Python one but would run as fast as the Rust version. On small inputs, of course, loading the Julia runtime will be noticeable but on larger inputs the wall time from the command line to the command line is basically the same.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Interesting, I thought I'd tested the case where n = 1 returns 2. I'll get back to you on that one. As for the Rust program requiring so many more steps, I'm not entirely sure why it would? The Rust and Python code is practically a 1:1 mapping with some extra boilerplate to register the Python functions. Interesting note about Julia though. How difficult is it to write Python extensions with Julia? I'd imagine it's a little trickier as Julia isn't compiled ahead of time.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I've just checked and the program returns 2 for the case where n = 1, without modification.
@mishaerementchouk
@mishaerementchouk Год назад
@@IsaacHarrisHolt My bad. I guess, I got zero, while I was having the increment of n after the condition. I am still trying to create a coherent picture of the ownership in Rust. Up to relatively recent times, creating libraries using Julia was awkward. Now, it seems there are more options. I didn't play with them, though.
@mishaerementchouk
@mishaerementchouk Год назад
A few words about Julia-based libraries. Partially this is provided by PackageCompiler package. Recently, however, new package StaticCompiler was introduced. Apparently, now one can even create standalone executable files. This one I didn't even try yet.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
That's cool! I haven't really played much with Julia, but I do like multiple dispatch. It'd be interesting to see how they got that working with static compilation
@canmetan670
@canmetan670 Год назад
I mean.... I acknowledge the syntactic simplicity Rust provides (which comes with its own quirks btw unlike python). I *WANT* to be convinced of using Rust but I still am not. Most people who use Rust including you claim "C is unsafe, uze Rust. C++ bad, Rust gud". Since C++11 (yes it is 2011 - it is 12 years old now) there are smart pointers. You would be hard pressed to come across C++ programmers using malloc or free. Even allocation with "new" is a code smell now. With smart pointers, when you get an exception, memory is guaranteed to be freed. Even shared pointer counter is thread-safe. Lots of ways to define atomic operations etc. How is the language not safe? Bottom line: if someone is writing unsafe C++ code in 2023, IMO they don't really know what they are doing / using 12+ year old techniques from old textbooks. Safe C++ code is as fast as C and should be at least on par or faster than Rust. What's the point?
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I do agree with all of this, BUT in order to write C++ safely you first have to KNOW about these things. Memory safety in C/C++ is essentially opt-in, whereas in Rust it's opt-out. Tooling for Rust is also much better than C/C++, making it more attractive for someone who probably only wants to dip their toe in and write a couple of hundred lines for a Python extension. Maturin makes this easy.
@canmetan670
@canmetan670 Год назад
@@IsaacHarrisHolt Yes I agree with all you've said as well. It is btw *easier* to write code in a safe way in C++ than the unsafe way but devs are still allowed to write bad code. Static code analyzers would scream at you at compile time and devs can ignore/suppress all the warnings as with any language. The core difference between Rust & C++ is trust: Car manufacturers can physically prevent any car from going above 100 km/h in a country if the maximum speed limit on any road is 100 km/h. Yes, it is safer this way, yes this should be the case for 99% of the time until you need to get to a hospital by breaking the rules and saving a life. Linux also trusts its users since you can do "rm -rf /*" on a system and completely make the system dysfunctional. It assumes you know what you are doing, trusts you 100% and gives you all the power. This is why it is on 96% of all servers are Linux worldwide. Strong encouragement is a yes, prohibition is a no for me. But I guess we think differently and that's fine
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
You can still write unsafe Rust, you just have to explicitly mark it as such with the unsafe keyword. Also, you mentioned static analysers for C/C++. That's ANOTHER tool that a beginner has to go out and find and learn how to use. With Rust, everything comes baked into the language, lowering the initial curve
@canmetan670
@canmetan670 Год назад
@@IsaacHarrisHolt I don't think I follow what you mean. - LLVM is cross platform and comes with clangd (language server + static code analyser). - g++ on linux & mac comes with its own analyser and will give you warnings. If you want MORE warnings you can enable them with -Wall and -Wextra and you can disable some of them. - On windows Visual Studio comes with its own static code analyser. I'm glad Rust has its own included in it's own compiler, I didn't know about that. But C++ has had that for ages and modern IDEs support them by default after installation. If you go for a text editor (Neovim, Emacs, VS Code) yes there is a bit of setup that is not beginner friendly. But Rust I assume would hardly be any different so I think I misunderstood you.
@nevokrien95
@nevokrien95 Год назад
Can you do some benchmarks on gpus? I am willing to donate my computing power for testing. If you can beat pytorch and tensorflow on memory usage and speed of matrix operations that would be huge
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I can certainly look into it! I have a 3080 I can use, which should be good enough for some little benchmarks. I assume you want me to use a Rust GPU library as well?
@nevokrien95
@nevokrien95 Год назад
@@IsaacHarrisHolt I am not familier with how rust does things. I supose you will have to do since only cuda can work directly on the gpu. A good benchmark could be to look on some c code in pytorch or tensorflow and rewrite it in rust. When doing it its important to remeber to use torch.no_grad or make the tf graph ahead of time (since the graph is basicly a form of compilation)
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Interesting. This one might take some time, but it sounds fun!
@gregoryshields4258
@gregoryshields4258 Год назад
I dunno. Seems to me that Rust is too complex and large, though apparently people like it.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
It's definitely tough to get into, but once you're there and you start using the type system properly, you get nice hand holding all the time you're programming
@souravsuresh2766
@souravsuresh2766 Год назад
Can’t we use Julia instead?
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Sure! Depending on what you're doing. If your primary focus is data science or analytics, then Julia will suit you fine. Not sure how Julia's getting on in the webserver space, as I don't keep up with it, but the changes to Pydantic that I mentioned will affect FastAPI, flask-pydantic, etc., which are growing more and more popular for backend work
@souravsuresh2766
@souravsuresh2766 Год назад
@@IsaacHarrisHolt Thanks for the reply. 😊
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Of course! I try to reply to every comment :)
@fraidoonhu9284
@fraidoonhu9284 Год назад
C# is only owned by Microsoft Java is only owned by Oracle and Golang only owned by Google but Rust is owned by them all. So be careful by using Rust don't get rusted.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I think it's worth making the distinction very clear here. The Rust Foundation is BACKED by companies like AWS, Microsoft, Google, Meta etc., but they don't OWN it. It was actually started by Mozilla. It's no different to how Go is supported by Meta, PayPal, Uber, Twitter etc. and well as Google, but it doesn't mean it's owned by them. A lot of Python's core team also works at Microsoft, but nobody would argue that Python is a Microsoft product.
@BrunoGomes-hh7nk
@BrunoGomes-hh7nk Год назад
golang is opensource
@lolikpof
@lolikpof Год назад
Rust isn't the new kid on the block, and hasn't been for a long while. Mojo is the new one, so new, matter of fact, that he ain't even on the block yet 😏 But when it's out, it's supposed to be the bomb that replaces python, with the speed and security of rust, and the convenience of python. Or so they say..
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Rust is relatively new to Python extensions, but yes, I'm very excited to try Mojo! I've got access to the playground, so I'm hoping to do a video on it soon
@NickWindham
@NickWindham Год назад
Agreed, I’m team Mojo. The Rust Foundation’s recent ridiculousness is a sign of future BS to come. I think it may slay adoption significantly just as Rust was was about to reach critical mass.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I definitely agree that it wasn't a smart move. I don't think the community will let them get away with it though, so I'm not toooo worried. But yeah, bit of a knock for the ol' reputation, that one
@danh5637
@danh5637 29 дней назад
I hope one day they can get rust or a successor to be faster than C
@IsaacHarrisHolt
@IsaacHarrisHolt 29 дней назад
I think that's going to be very difficult, considering C just compiles pretty much straight to assembly. Rust does extra checks at runtime that C doesn't, so I don't think they'll be able to make it faster for all cases
@SilasDuarte-e9k
@SilasDuarte-e9k Месяц назад
Zig > Rust 😎
@IsaacHarrisHolt
@IsaacHarrisHolt Месяц назад
I don't know Zig well enough yet 👀
@Siissioe123
@Siissioe123 10 месяцев назад
You need C, if you learn C you also learn how a computer works, and then you learn Rust,
@IsaacHarrisHolt
@IsaacHarrisHolt 10 месяцев назад
True! But this video is about authoring Python extensions, which is much easier in Rust, imo :)
@verdynn5917
@verdynn5917 Год назад
No boilerplate was here
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Tris was definitely an inspiration :)
@george_potoshin
@george_potoshin Год назад
Good luck with simplicity of Rust. C is by the way the simplest language and I think that average speed of code writing is faster in C rather than in Rust. I’m not saying that Rust is bad, but it’s just too overhyped
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
It really depends what you're doing. For some things, sure, C will be quicker. But the second you need any higher level constructs like hashmaps you're kinda on your own. You either have to write something yourself or pull in some other code (which is a painful process sans a package manager). Also, while the speed of coding in C might be faster, the time to stable code is probably quite a lot higher. The Rust compiler makes a LOT of guarantees that C compilers just don't.
@LOC-Ness
@LOC-Ness 9 месяцев назад
If Rust is so much better than C why are it's raylib bindings so out of date?
@IsaacHarrisHolt
@IsaacHarrisHolt 9 месяцев назад
I would imagine the C bindings for raylib are more up-to-date because raylib is written in C... so there are no bindings. Also, this video is about Rust being better than C for Python extensions. If you're using raylib, you probably shouldn't be writing Python 😅
@RobertFletcherOBE
@RobertFletcherOBE Месяц назад
say goodbye to the complexities of C and say hello the the complexities of the borrow checker and your inevitable need for the unsafe keyword 🤣. Personally Zig seems like a better fit but in the end whats actually important is the work gets done right
@IsaacHarrisHolt
@IsaacHarrisHolt Месяц назад
Say goodbye to the footguns of C 😉
@noertri618
@noertri618 Год назад
C needs upgrade
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
That's what the C++ folks said, and look how that ended up 🙃 I kid, of course. Modern C++ isn't as bad as it used to be, but the backwards compatibility guarantee is making it all a bit of a mess. I do sometimes worry that Go and Rust are headed that way eventually
@oopss794
@oopss794 Год назад
mojo guys are just hyping without any know about the rust lang , rust has the best type system in the world of languages & safety is a priority & privacy in mind, without losing performance, and also it has a powerful eco system .
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Totally true! People also don't appreciate that the Mojo example that was given was a very niche one, applying to problems you're not really going to face outside of a data scientist role. Most of Python's usage isn't for that, so I'm keen to see how Mojo will work when running something like a webserver. I have access to the Mojo playground, and will definitely be experimenting with it for a video, so keep your eyes peeled!
@unknownguywholovespizza
@unknownguywholovespizza 9 месяцев назад
A powerful ecosystem? No, just no.
@Juksemakeren
@Juksemakeren Год назад
The rust logo is a design abomination.
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
You'd better not be insulting poor Ferris!!
@herrmitbusen228
@herrmitbusen228 Год назад
Time will tell
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
It will! Which side of the debate do you happen to be on?
@herrmitbusen228
@herrmitbusen228 Год назад
@@IsaacHarrisHolt I'm more of a C guy, however, I believe that for things like writing performant modules for higher level languages, Rust and potentially Zig will eventually dominate
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Honestly, I kinda hope so. While C is incredibly powerful, it's nice to see languages that can match its speed without having to compromise too much on DX. I've not written much pure C, but my experience with C++ was... unpleasant, to say the least. Still, I respect the history and the power that's there. I mainly use TypeScript and Go day-to-day though so maybe my opinion doesn't count 😜
@herrmitbusen228
@herrmitbusen228 Год назад
@@IsaacHarrisHolt I use C++ pretty often, but i skip classes and functional programming. I just don't find classes (At least in C++) to be useful or convenient, i just use structs. As for functional programming, in most of my use cases functional programming would bring zero value, if not adding additional complexity and potential performance hickups. Even though i'm not a big FP fan, i think that Rust does a way better job at FP than C++. Heck, i'd say Rust does a better job at FP than Haskell! Obviously, Haskell is more "Pure" and "Mathematical", but based on my experience, the functional programming in Rust is way more useful/convenient than programming in Haskell, not to mention the obvious performance difference. Whilst i'm not a huge Rust fan, i'm not a hater either and i would like to see some cool concepts like Traits (They do exist in other languages, but i think Rust does them the best) and Enums (Once again, they exist in other languages, but Rust does them the best) being implemented in other languages
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
I'm also a big fan of Rust enums. There are so many cases where I'm fighting TypeScript and I just think "God, this would be easier with a Rust enum". Even earlier today I was designing a type for defining a column in a data table, and I had type guards EVERYWHERE. Not fun. I'm curious, what do you use C/C++ for? Most of my C++ experience comes from biological modelling when I was involved in some COVID research.
@youtuberschannel12
@youtuberschannel12 Год назад
AI will consume any need for programming language in the future. It will be natural language straight to machine code! Looking forward to your future video titled "AI and Why You No Longer Need Programming Language" 😊
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Hopefully not! I like my job! ...and the, uh, monetary benefits being a software engineer brings.
@youtuberschannel12
@youtuberschannel12 Год назад
@Isaac Harris-Holt unfortunately that day will come. You'll still have your job. Jobs will just evolve with tech. Software engineers will just evolve to prompt engineer. I just tried and yea chatgpt can generate machine code 🙃
@unknownguywholovespizza
@unknownguywholovespizza 9 месяцев назад
LMAO then why don't you build a successful app using AI?
@honaleri
@honaleri 6 месяцев назад
Lol. And who would write your ChatGPT optimizations? Oh right... no one. You wouldn't even understand what an optimization is seeing as you let the tool think for you. 😂
@TheBlackmanIsGod
@TheBlackmanIsGod Год назад
You can’t just start teaching RUST like that!!!! People need to know why RUST even has Fibonacci sequence in it!!! People need a fuller picture to wrap their minds around the inner workings that why they will be able to understand what they are doing and understand when something breaks and understand how to fix it, when you just jump in to showing them Fibonacci but not explaining everything this is how you ruing the career field and space!!! Why would you want to half ass empower people instead of completely and wholly empower them????? This is what’s wrong with the computer minds……
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Hey, I appreciate the feedback, but I'd appreciate if you could keep from yelling in my comments 😉 As I mentioned in the video, I'm not trying to teach Rust here. I'm just using a simple example to show how to mix Python and Rust- if people want to use this, they'll need to teach themselves some Rust.
@TheBlackmanIsGod
@TheBlackmanIsGod Год назад
@@IsaacHarrisHolt I’m not yelling that’s just how I talk! 😭🫣 I apologize for being too loud!
@SushantShekhar-my7eu
@SushantShekhar-my7eu Год назад
okay im gonna try out wardrobegpt
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
That would be great!
@James-l5s7k
@James-l5s7k 5 месяцев назад
Until you want to use a library, or integrate your code with a system. This is hipster nonsense.
@IsaacHarrisHolt
@IsaacHarrisHolt 5 месяцев назад
I'm not entirely sure what you mean. All you're doing is writing a Python library, but in Rust. You can build it and push it to PyPI, then it acts like any other library, and you can just install it with pip. Other libs like Pydantic and Polars already take this approach, and people successfully use them in large projects all the time, so I'm not sure your argument holds water, I'm afraid. The maturin develop command just helps you install the code into your local environment for testing, which is how I use it in the video.
@John223
@John223 Год назад
I don't need C, but I just started learning C, and I like it
@IsaacHarrisHolt
@IsaacHarrisHolt Год назад
Nice! C is a great language to know, and can be really useful. I personally prefer Rust for Python stuff, but I can definitely see the benefits of C in other areas.
Далее
Why Rust is NOT a Passing Fad...
8:54
Просмотров 39 тыс.
Seja Gentil com os Pequenos Animais 😿
00:20
Просмотров 19 млн
Why i think C++ is better than rust
32:48
Просмотров 314 тыс.
Rust is Not C
16:24
Просмотров 196 тыс.
Rust is not a faster horse
11:37
Просмотров 328 тыс.
Compiled Python is FAST
12:57
Просмотров 113 тыс.
What Makes Rust Different?
12:38
Просмотров 203 тыс.
Gleam is not Rust
7:46
Просмотров 22 тыс.
why do header files even exist?
10:53
Просмотров 415 тыс.
The FASTEST and SAFEST Database
40:56
Просмотров 231 тыс.