Re:Rust needs a web framework for lazy developers
by mrbonner on Monday October 07, 2024 @02:34AM
(#41763325)
I think RC and clone are the way people begin to use Rust. While lots of criticism are against this usage for not idiomatic, it should be acceptable. Coming from Python, nodejs or Ruby, even RC and clone or stack based variables is still a magnitude faster than those languages. When it's about absolute control for performance you can drop down a notch to the borrow checker behavior.
[ Parent
| on HN ]
Re:Rust needs a web framework for lazy developers
by mathw on Monday October 07, 2024 @03:19AM
(#41763555)
That's an interesting perspective I'd not considered before. Maybe there are different "registers" of Rust, in the same sense that linguists talk about registers in human languages, where you use your language differently for different purposes.
And thus, maybe if you're writing something that doesn't need to be screamingly fast absolutely all the time there's a register of Rust where putting lots of things in Rc<Box<T>> is completely acceptable, in much the same way that you might use a lot of impolite words around your friends but you don't in front of your employer.
Re:Rust needs a web framework for lazy developers
by Philpax on Monday October 07, 2024 @04:00AM
(#41763741)
You may be interested in https://without.boats/blog/the-registers-of-rust/ :)
Re:Rust needs a web framework for lazy developers
by LtdJorge on Monday October 07, 2024 @05:15AM
(#41764143)
I think Rc<Box<T>> could be simplified to Rc<T>.