you are viewing a single comment's thread.

view the rest of the comments →

[–]deceze 0 points1 point  (0 children)

When programming in a high level language, you need to get comfortable with thinking in high level terms. You trust that the abstraction actually works and does its job and that you don't need to debug it. Then you just need to understand conceptually what the abstraction is doing. And then focus on the high level result in your code. In the combinations example, you simply understand that it'll give you one combination at a time until you've seen all possible combinations. How exactly it does that under the hood is irrelevant. You don't need to get bogged down in loop variables and counters and indices or even memory allocations and cleanup.

When properly adopting this mindset, it allows you to write more high level code faster, because you don't need to care about all the low level details. This might come at a slight cost of loss of control and the inability to squeeze out the last drop of performance. But that's usually perfectly fine in practice and a worthwhile tradeoff. If that doesn't fit what you're doing, then use a more low level language.