Comment by tptacek
12 hours ago
I wish Go had sum types too. But I like being able to write a mutable tree structure without first having to read a whole book on the subject and inventing a new system of pointers. Every language is tradeoffs.
12 hours ago
I wish Go had sum types too. But I like being able to write a mutable tree structure without first having to read a whole book on the subject and inventing a new system of pointers. Every language is tradeoffs.
As a C++ dev, such comments reinforce my hesitation to pick up either Go or Rust seriously :) It seems I already have the golden middle after all.
I like the language saying "it's not as easy as you think" when I'm about to do something ill-advised like roll my own mutable tree structure.
It is in fact not that hard when your memory is automatically managed
You understand that tree structures aren't just lookup tables, right? I wouldn't roll my own red-black tree (Jesus how tedious would that be). That's not what I'm talking about.
I mean, it is as easy as you think in a GC language