3 ms·
Such indirection requires readers to go look up the definitions of other things to understand the meaning of each function. The nice thing about abstraction is
by chriswarbo 7y ago
Such indirection requires readers to go look up the definitions of other things to understand the meaning of each function.
The nice thing about abstraction is that we don't need to go look up the definitions (unless we're tracking down a bug that's in those parts!): we can read a line like `if checkHasPermission(x):` and get the gist of what's happening, and skip over it if we don't care about the permission system at the moment.
- tanseydavid 7y agoWhen done properly, a function/method should be clear in terms of intent at the point of call. I will be the first to admit that proper-naming is most usually rather challenging .
- chriswarbo 7y ago> When done properly, a function/method should be clear in terms of intent at the point of call. Yes, of course, but that (I claim) implies that the function/method has abstracted something. The parent was claiming that using indirection to hide code can be useful for readability, even when there is nothing being abstracted.