3 ms·
> I think the idea is that these fundamentals could/should be supplied by the standard library There is basically no limit to the number of data structures pos
by masklinn 6y ago
> I think the idea is that these fundamentals could/should be supplied by the standard library
There is basically no limit to the number of data structures possible, nor to the possible implementation details of most of them, all of which can be relevant to the situation at hand.
The stdlib can hardly be expected to implement them all.
- brundolf 6y agoIf they're very specific to the situation at hand, they're much less likely to need to be generic. The GP explicitly mentioned "Linked Lists" and "Trees". You don't need to be writing your own linked-list or (basic) tree from scratch.
- masklinn 6y ago> The GP explicitly mentioned "Linked Lists" and "Trees". And graphs. > You don't need to be writing your own linked-list or (basic) tree from scratch. Trees are rarely useful in and of themselves, what's useful is the data structures you're building out of them. And that, in turns, informs a significant number of properties of the tree you'll be using as well as the operations to perform. The stdlib providing "a basic tree" and essentially telling users to get bent would be worse than useless, it would be actively insulting. Even for the humble "linked list" there are half a dozen possibilities: singly linked? Immutable? Doubly-linked? Circular? Array-of-nodes?