3 ms·
You don't have to do that thinking if you use a library which implements one for you, which is one reason why we made libraries so easy to use.
by steveklabnik 9y ago
You don't have to do that thinking if you use a library which implements one for you, which is one reason why we made libraries so easy to use.
- foldr 9y agoIt's true in any language that you don't have to think about implementing a data structure if there's a library that already implements it. I think that clearly misses the point of what I was saying, though. Quite often you do have to implement data structures yourself. Here's a concrete example: https://en.wikipedia.org/wiki/Doubly_connected_edge_list https://en.wikipedia.org/wiki/Doubly_connected_edge_list This is a data structure that you're quite likely going to have to implement yourself. It is, obviously, possible to implement a DCEL in Rust. However, to do so it is necessary to make a number of decisions (unsafe pointers? indices instead of pointers?) that you don't have to make in, say, Go or Java, where you can just use ordinary pointers/references. Again, that is not a criticism of Rust. It's just an observation about its design tradeoffs.