News for hackers. Stuff that matters.
Re:Notes from an Interviewer by hajile on Saturday February 24, 2024 @10:23AM (#39492136)
Encapsulation is extremely important and pairs with single responsibility, but that’s completely orthogonal to OOP.

Once you are solidly in the composition camp, functions are immediately superior. They tend to be naturally single purpose and have mathematical rules that make them easy to compose.

Most function-heavy languages also adopted modules which provide a better, less-leaky abstraction too and that’s without getting into all the other advantages in the type system or better syntactic ergonomics from dropping all the OOP baggage.

There are no comments on this comment yet.