A nice video and always nicely structured. I would also add the borrow checker, as soon as you end fighting against but working with it, you improved your knowledge of the memory model and concurrency patterns which are only optionals in other languages.
@JeremyChone
Жыл бұрын
yes, very good point. I did not find a way to articulate concisely, but I see "data integrity" as part of the "Data First" point. As you say, Rust makes us understand how data flows through the application code.
@JorgetePanete
Жыл бұрын
This video helped me understand how rust uses composition better, thank you
@pup4301
Жыл бұрын
There is pseudo polymorphism where you have a dyn trait with a function that converts it reference holder from a dyn trait to dyn any trait. You then downcast the dyn any trait to a structure that implements the dyn trait. Also rust pseudo inheritance because you can take that same dyn trait and give a structure a structure that own that dyn trait with a as_any function, get function and get_mut function. The get functions will get the structure embedded in the owner structure. You can the implement function along with the get functions to call the functions of the slave structure while at the same time you will be able to call the functions of the owner structure.
@L0wPressure
Жыл бұрын
I mean, i tried it and it works. Is it actually a good idea to use it though?
@pup4301
Жыл бұрын
@@L0wPressure Yes because I no longer have to type out the paths for a embedded structure and I can have a list of different typed structures and pass them around as if they are the same type.
@L0wPressure
Жыл бұрын
Good points. Regarding the inheritance: i'm reading a book Web programming in rust and right in the beginning author suggests to create artificial parent class BaseRole to be inherited in AdminRole { super_class: BaseRole ... }. It's probably to make Java guys feel at home, but that looks SO weird in the rust context.
@JeremyChone
Жыл бұрын
Hum, that would be a miss-used IMO. My strategy with Languages is to not fight with their spirits. Don't code TypeScript the Java way, don't code Swift the Java way, and obviously, don't code Rust the Java way. Understanding the "gist" of the language and embracing is essential (IMO). Otherwise, we are in constant dissonance.
@krischalkhanal2842
Жыл бұрын
Henry Tance
@glennmiller394
Жыл бұрын
Thanks!
@JeremyChone
Жыл бұрын
Thanks a lot, very much appreciated.
@李晧暐
Жыл бұрын
Thank you for your video !! You explain so clear and make me understand easily!! Great author
@FauzulChowdhury
Жыл бұрын
Alright alright... I am gonna start 🦀 rust. Nuf said.
@BA-oq2ih
Жыл бұрын
Thanks for the video! 👍🏼
@vanlepthien6768
Жыл бұрын
For every good feature, there is someone who will find out to make it go bad :)
@adjbutler
Жыл бұрын
amazing video! well done!
@blasm1713
Жыл бұрын
very informative, frenchman
@electron6825
Жыл бұрын
A bit rude lol
@user-qr4jf4tv2x
Жыл бұрын
if only we can have a js,c# like structure without the pitfalls of each and the performance of rust and the best parts of rust.. if its not for performance people would have still stick to high language.
@esben181
Жыл бұрын
Wtf is good code? If it's fast and doesn't segfault then great
@JeremyChone
Жыл бұрын
Here is my take on what makes good code (probably not exhaustive) 1) Fast to start, fast to run. 2) No segfault. 3) No thread-unsafe code. 4) Componentized and compartmentalized. 5) Simple to get back into 6 months after. 6) Simple to add new functionality while improving the data and "application" model. Here Simple != Easy. Easy = Close of reach. Can get something working fast without too much learning at the cost of intertwined layers. Simple = Various layers/structures are more decoupled but integrate well without knowing about each other. Often require more upfront work on learning the technology and designing the model, but from our experience, it scales much better.
@esben181
Жыл бұрын
@@JeremyChone Yes I agree
@MarcosVMSoares
Жыл бұрын
No Rust isn't data first. That is Elixir, Clojure and outher functional languages. Rust still mix data with functions and therefore create methods. But still better the OOP or something like Go
@HansBezemer
3 ай бұрын
"Data first" is a state of mind. You might find languages that facilitate that more than others, but it still depends on the programmer. OOP _thinks_ it puts "data first", but all it does is integrate code into the data - and _bind_ it to that data. And this is not the right way to express relationships. Let me put it this way: do the bonds between two hydrogen atoms and one oxygen atoms belong to the oxygen atom or to the two hydrogen atoms?
Пікірлер: 25