Hacker News new | ask | show | jobs
by cos 6284 days ago
I see things like this coming up in the literature from time to time, since the mid-90s or so when OO started becoming all the rage.

Even back then, though, I could never convince myself that it was a good model, until Perl5 came along and I started using objects without inheritance. Perl5 allowed inheritance, but it made has-a relationships just as easy and convenient to use as is-a relationships, and didn't push the is-a (inheritance) ideology at me, so I didn't bother because it wasn't useful as far as I could see.

I'm still convinced that the disadvantages of is-a OO (using a lot of inheritance) far outweigh the advantages, and that it is a misguided model for programming. has-a (containers without inheritance), on the other hand, is comfortable for me.