3 ms·
The abstraction is in removing the cognitive overhead needed to understand this. The original programmer can now allocate the time saved to higher level concern
by mentos 11y ago
The abstraction is in removing the cognitive overhead needed to understand this. The original programmer can now allocate the time saved to higher level concerns. That is what C did for assembly and what Python is doing for C. Is that not the theme of abstraction?
- blktiger 11y agoIn this case I actually think the cognitive overhead is larger for the in range(5) call. You have to know how that will behave, is it 1 <= x < 5 or 1 <= x <= 5? The comparisons are more explicit and they are quite easy to read in this case.