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

> Prefer composition over inheritance has been a common mantra for at least a decade, if not more. Maybe you should undergo the last decade of development and training.

What are some other well known mantras? The null reference is a billion dollar mistake? Minimise mutability?

Maybe the language designers and library writers could catch up too.



Records and value/primitive classes are immutable, not to mention https://openjdk.org/jeps/401


Inheritance is a useful feature, using bad abstractions is a user error.

Nulls are an error in that no language feature solves them (though third-party tooling does), so far at least.




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

Search: