top | item 44083646

(no title)

Blikkentrekker | 9 months ago

Ehh, I always took the “don't reinvent the wheel” advice in context of “wheels” being very simple things that everyone can create but no one wants to spend time on. It's typically not really a learning exercise to say implement quicksort or some hash table; it simply takes time.

You will also rarely build a better implementation of these things than whatever is in the standard library or even some other library that already exists. If anything, it's better to, if one have a better idea, to contribute one's patches there.

discuss

order

sfpotter|9 months ago

It actually isn't that hard to come up with something better than what's in a standard library, but that requires understanding what better means for what you're working on. That's the hard part. In my experience, people who say "don't reinvent the wheel" are also the people who have the poorest understanding of requirements: what "better" means.

A standard library data strucute or algorithm has to be something for everyone, so it can't be truly great at a specific thing. If you understand your specific use case extremely well it (and are competent...) it can be very easy to run circles around the standard library.