3 ms·
Functions are abstractions of the business logic. If they weren't then you couldn't use them over and over again. It's abstracting by exposing a simple interfac
by proc0 5y ago
Functions are abstractions of the business logic. If they weren't then you couldn't use them over and over again. It's abstracting by exposing a simple interface that then does more under the hood, and this is repeated layer after layer, from functions to libraries.
The decision of what a function will do over and over again is abstracting the layer below which if it weren't for the function, would have repetition of some kind. It's taking those repeated bits, and factoring out the different elements reducing them to a function call.
That said, I understand where this perspective is coming from, and perhaps "refinement" is more descriptive of a more practical approach.