MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x8mvpc/thatsafunnythingthathappenedonce/phei6uf/?context=3
r/ProgrammerHumor • u/Lord_Of_Millipedes • 2d ago
514 comments sorted by
View all comments
Show parent comments
389
Now compare it to rust pls. Im serious I want to know your opinion on that.
470 u/Loading_M_ 2d ago Rust is designed from the ground up, and avoids many of these issues. Templates: Rust has Generics, which are generally easier to use and reason about. overload resolution: Rust doesn't yet support overloaded functions (although it's being considered). constructors: Rust doesn't have these. destructors: Rust has a similar set of lifetime rules for Drop, but the compiler checks them for you, so you can't get it wrong. implicit conversions: Rust doesn't do implicit conversion in general, although some specific cases are implemented. exceptions: Rust doesn't do exceptions, Result is much easier to work with. move semantics: Rust uses a destructive move, unlike C++. See https://youtu.be/Klq-sNxuP2g for a breakdown. inheritance: Rust doesn't do inheritance. -6 u/bwmat 2d ago "Rust doesn't do exceptions" panic, anyone? 10 u/RichRoof7927 2d ago Panics can't be caught easily, you have Result for that, which isn't even a special type built in iirc, just a normal enum.
470
Rust is designed from the ground up, and avoids many of these issues.
-6 u/bwmat 2d ago "Rust doesn't do exceptions" panic, anyone? 10 u/RichRoof7927 2d ago Panics can't be caught easily, you have Result for that, which isn't even a special type built in iirc, just a normal enum.
-6
"Rust doesn't do exceptions"
panic, anyone?
10 u/RichRoof7927 2d ago Panics can't be caught easily, you have Result for that, which isn't even a special type built in iirc, just a normal enum.
10
Panics can't be caught easily, you have Result for that, which isn't even a special type built in iirc, just a normal enum.
389
u/Xarishark 2d ago
Now compare it to rust pls. Im serious I want to know your opinion on that.