Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A sports team is a state-machine that evolves in time; a list, or indeed even a value object, doesn't itself express this.

That said, the pithy, smug, common and unenlightening answer is that inheritance breaks encapsulation. But really, that's a terrible reason not to extend a collection class if you really want to. Just remain aware of the trade-offs and do it.



Java Lists evolve in time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: