Comment

Comment by Tarean

An insight I found quite interesting:

oo style is great at extending types. You can add a subtype at a later date without modifying existing code and it just works.

Functional style is great at extending behavior. You can take an existing type and implement new functions on it. This means you can have a lot of functions defined on a basic data type which is amazing for composition but you can't add a new type that works with the same methods if you didn't anticipate this need.

parent Tarean 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton