2 ms·
Quite often in Rust, the way to make it easier is to go one step back: instead of thinking about how to make a tree right, you might want to think about why you
by hashmal 9y ago
Quite often in Rust, the way to make it easier is to go one step back: instead of thinking about how to make a tree right, you might want to think about why you want a tree in the first place. Sometimes it's the right thing to do, sometimes there is another approach that fits Rust's paradigm better.
Speaking of paradigms, although Rust definitely looks "imperative", the ownership system makes it bloody different. Try to implement a tree "as in C" using Haskell or Prolog and you will lose time and energy for a result that does not use the language to its fullest.
- ComputerGuru 9y ago> instead of thinking about how to make a tree right, you might want to think about why you want a tree in the first place. Sure. But that's true for every programming languages, at least in my experience. Anyway, someone, somewhere will actually want/need that tree. And they'll run into the aforementioned problems.