Re:100 days with Rust: a series of brick walls
by jdemler on Friday March 23, 2018 @07:15PM
(#16663489)
Ever tried changing an owned field in a struct to a borrowed one with lifetimes?
Be prepared to change not only the struct and its fields but also everything else where it appears.
Yes, the compiler will catch your mistakes, but no, it's not something I love.
[ Parent
| on HN ]
Re:100 days with Rust: a series of brick walls
by tormeh on Friday March 23, 2018 @09:21PM
(#16664142)
I think the Rust devs like C++'s abstraction level. Rust is about the same (more modern), it just catches your errors. I don't think it's possible to make Rust as ergonomic as Python, but I do think it's possible to move a little in that direction without losing Rust's strengths.
Re:100 days with Rust: a series of brick walls
by pjmlp on Saturday March 24, 2018 @04:37AM
(#16665545)
Actually that is the goal of the other languages, Swift, Haskell, OCaml, ParaSail...
Influenced by Rust's success bringing affine types into mainstream.
To keep using automatic memory management as their default way of managing memory, while offering some escape hatches based on affine types for low level optimizations.
Re:100 days with Rust: a series of brick walls
by danieldk on Saturday March 24, 2018 @02:59AM
(#16665259)
Indeed, this is painful. Plus that lifetimes tend to percolate through the codebase. This is logical and necessary, if a struct is bound to a lifetime, then another struct holding this struct is also bound to that lifetime. It can be painful regardless ;).
Re:100 days with Rust: a series of brick walls
by steveklabnik on Saturday March 24, 2018 @08:07AM
(#16666218)
I hear you. It’s an important thing though; it will get slightly easier soon...