News for hackers. Stuff that matters.
Re:That's Not an Abstraction, That's Just a Layer of Indirec... by highfrequency on Saturday December 28, 2024 @03:08PM (#42534135)
Great point, and agree that generalization makes for the clearest wins from abstraction.

But there are also cases where there is no generalization, but the encapsulation / detail hiding is worthwhile. If you have a big function and in the middle of it you need to sort some numbers, you would probably implement a Sort routine to make the control flow much easier to understand - even if you only use the function once (let’s pretend there’s no sort functionality in standard library).

Curious if others agree, and what heuristics you use to decide when implementation encapsulation is worthwhile.

There are no comments on this comment yet.