logoalt Hacker News

jesse__last Thursday at 9:05 PM1 replyview on HN

> the people who made your HashMap type are much better equipped to optimize ...

Who's to say I'm not the one making the hashtable? There are plenty of real-world reasons the standard library hashtable may be either inaccessible or unsuitable.

Furthermore, the idea that "oh, honey, it's too hard, smart people did it for you" is insufferable and needs to die. When I'm the one making something, I have dramatically more information about the problem I'm trying to solve than the author of a hashtable library, and am therefore much better equipped to make design decision tradeoffs.

Please stop perpetuating the idea that 'just use a library' is unilaterally the best option. Sometimes, it's not.


Replies

tialaramexlast Thursday at 10:37 PM

If you made your own type, you should implement Extend. It seems you agree that in this case you are best placed to do a good job.

And indeed if you have your own custom operation you want, it may well make sense for you to implement it on both your own types and stdlib types.

show 1 reply