logoalt Hacker News

tangustoday at 12:26 PM2 repliesview on HN

Aren't they basically saying opposite things? Perlis is saying "don't choose the right data structure, shoehorn your data into the most popular one". This advice might have made sense before generic programming was widespread; I think it's obsolete.


Replies

embedding-shapetoday at 1:55 PM

> Perlis is saying "don't choose the right data structure, shoehorn your data into the most popular one"

I don't take it like that. A map could be the right data structure for something people typically reach for classes to do, and then you get a whole bunch of functions that can already operate on a map-like thing for free.

If you take a look at the standard library and the data structures of Clojure you'd see this approach taken to a somewhat extreme amount.

Rygiantoday at 12:55 PM

Pike: strongly typed logic is great!

Perlin: stringly typed logic is great!