3 ms·
We needed a set-like data structure with enumerable interface that would also know how to handle attributes from parent classes. That's why a custom object work
by solnic 14y ago
We needed a set-like data structure with enumerable interface that would also know how to handle attributes from parent classes. That's why a custom object worked better.
oh and since it's an enumerable it's easy to work with it just like with a hash.
I'm also not saying you should never ever use primitive objects because that would be silly :) The trick is to determine when it is better to use a custom class instead of misusing existing primitive ones. Hash is a good example in Ruby, people use it way too often.