|
|
|
|
|
by dataflow
840 days ago
|
|
I think we might be speaking past each other? How is enum in Rust a tree type? You might be able to use it to create a tree type, but that's no different from using struct to make struct Tree : std::vector<Tree> {}; in C++. That wouldn't mean C++ has a tree type, it just means it's not hard to create your own. Whereas std::list is actually a linked list type that's already there. |
|
However, algebraic data types really make your life easier, and more languages should have them.