Rust is famous for strictness in terms of memory management and error handling. But there is also a not very well known and to my mind a bit of a unnecessary stiffness in the type system when talking about trait specialization. Here is a minimal example, you don't not need to be an expert in Rust to understand it.
Basically rust compiler assumes that in the future there might be a type that implements both A and B and therefore this will create a conflict. To my mind this is not needed as this can be intentional design that the traits A and B are not planned to be implemented at the same time.
Basically rust compiler assumes that in the future there might be a type that implements both A and B and therefore this will create a conflict. To my mind this is not needed as this can be intentional design that the traits A and B are not planned to be implemented at the same time.
play.rust-lang.org
Rust Playground
A browser interface to the Rust compiler to experiment with the language
Currently this can be solved by wrapper type pattern and boxing. But surely this is not very elegant. Hopefully language design team will fix it with specialization, though it is still uncertain when this feature is planned to be released.
doc.rust-lang.org
Box in std::boxed - Rust
A pointer type that uniquely owns a heap allocation of type `T`.
Good Design sounds a bit too generic and sometimes people overuse this term as an argument to bring in unnecessary complexity, but I agree with the other points https://twitter.com/graninas/status/1380451255764537345
Twitter
Alexander Granin
Truths I've Learned The Hard Way Good Design > Performance Getting Things Done > Perfection Tests > Automatic Correctness Simplicity > Math beauty People > Technologies Experiment > Belief
Wow someone actually believes Java is underrated. Well then I guess if it was properly rated 100% devices would be running Java?😅
Twitter
Jenny Codes 🏴
Java is underrated.
fasterthanlime articles are always fun to read https://fasterthanli.me/articles/so-you-want-to-live-reload-rust
Well, yeah, sort of... Though Liskov's Substitution Principle I would argue is purely about objects. But I feel like the principles are rather common and just need to be reformulated in a more general way. It's time we stopped considering OO as the only model that exists 😁.
https://t.co/yuP2yyF7TX?amp=1
https://t.co/yuP2yyF7TX?amp=1
DEV Community
Do the SOLID principles apply to Functional Programming?
If you are interested in reading this article in Spanish 🇪🇸, check out my blog: The Developer's Dunge...
It's good that remote opportunities now are somewhat fixing the issue. I guess it's one of the positive outcomes of the whole COVID situation.
https://twitter.com/graninas/status/1382906570913284098?s=19
https://twitter.com/graninas/status/1382906570913284098?s=19
Twitter
Alexander Granin
Russian software businesses: "$200K annually? No way. $30K at most. There is literally no any company in the world which would pay more. That's just a myth."twitter.com/_m_b_j_/status…
I was reading through some thoughts of the Rust newcomers. And in general I think there is a bit of confusion.
Rust is not only about memory safety with lifetimes.
As it is mentioned at the https://www.rust-lang.org/ Rust main goals are reliability and efficiency.
Rust achieves these goals through many different language features and design patterns, and lifetimes are just a part of it. In fact they support the more general concept: ownership model.
Ownership model is undeniably a great helper in terms of reliability. Though lifetimes are just an implementation aspect of it, not the main focus.
In conclusion I would say when trying Rust it's better to go one by one through the book chapters, it tries to show all of the aspects of the language tying them to the corresponding language goals. Rust introduces many new concepts and though lifetimes are maybe the most well known of them, it is just one of the many.
Rust is not only about memory safety with lifetimes.
As it is mentioned at the https://www.rust-lang.org/ Rust main goals are reliability and efficiency.
Rust achieves these goals through many different language features and design patterns, and lifetimes are just a part of it. In fact they support the more general concept: ownership model.
Ownership model is undeniably a great helper in terms of reliability. Though lifetimes are just an implementation aspect of it, not the main focus.
In conclusion I would say when trying Rust it's better to go one by one through the book chapters, it tries to show all of the aspects of the language tying them to the corresponding language goals. Rust introduces many new concepts and though lifetimes are maybe the most well known of them, it is just one of the many.
rust-lang.org
Rust Programming Language
A language empowering everyone to build reliable and efficient software.
Ruby Ruby Ruby... (Song by Kaiser Chiefs)
*Music fades*
https://twitter.com/editingemily/status/1383509743977697288?s=09
*Music fades*
https://twitter.com/editingemily/status/1383509743977697288?s=09
Twitter
emily freeman
I know a ton of Ruby devs who named their kid Ruby but not a single JavaScript engineer with a kid named DOM.
One of the more elegant explanations of the financial side of bitcoin and many other cryptocurrencies.
Paul Graham to his kids:
https://twitter.com/paulg/status/1384040569710682113?s=09
Paul Graham to his kids:
https://twitter.com/paulg/status/1384040569710682113?s=09
Twitter
Paul Graham
How I explained Bitcoin to my kids. A currency needs two things: to be easily transportable, and to be rare. Bitcoin is easily transportable because you can send it from computer to computer, and rare because to make more you have to solve increasingly hard…
