3 ms·
What were the hurdles that you encountered? One difficult aspect of Rust relative to Go must surely be generics and trait bounds. This is something it shares w
by solidsnack9000 10y ago
What were the hurdles that you encountered?
One difficult aspect of Rust relative to Go must surely be generics and trait bounds. This is something it shares with Haskell and Scala. For people coming from those languages (like myself) the stack/heap thing is the most salient.
- civility 10y ago> What were the hurdles that you encountered? > One difficult aspect of Rust relative to Go must surely be generics and trait bounds. Conceptually this isn't bad at all. I understand the value and mechanism of specifying the required traits for types to a generic function. However, I just posted an example elsewhere in this discussion where there simply isn't a trait for the method I want to call. That was certainly a hurdle for me, and the workaround wasn't satisfying. I mostly understand the semantics of borrowing mutable vs read-only references, and I'm pretty sure I understand the purpose and value of the concept. However, specifying lifetimes is completely different than any other language I've ever used, and I've used a couple dozen languages over several decades in my career. I haven't gotten past that hurdle yet. > the stack/heap thing is the most salient. I'll stick with my statement that I understand the stack and heap well enough (from a C or C++ point of view), but composing Box, Cell, Ref, RefCell, and friends is a non-trivial hurdle.