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

It prevents accidentally overriding the member in subclasses which can prevent private implementation details of parent classes from being accidentally interfered with by child classes.

As composition over inheritance becomes more idiomatic, there are probably less places where this matters, but as long as inheritance is used at all it can be useful.



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

Search: