Skip to content

Comment on New release of Self programming languageparent

Comments

Or perhaps neither? It's conventional wisdom these days that composition often works better than inheritance.

It's even more conventional wisdom that these two things are absolutely not mutually exclusive and that it's actually recommended to use both.

By the way, "composition" is ambiguous:

- Composition of classes is usually a shortcut used to describe inheritance of interfaces and implementation through aggregation (there's only one mainstream language today that supports this natively: Kotlin).

- Composition of functions, which is pretty much mainstream in most popular languages today.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.