Amusingly, I'm somewhat the opposite - math written as code takes a lot more parsing to understand. And with regards to for loops, I'll quote something I read a long time ago:
> “When you see a for, while, or do, all you know is that some kind of loop is coming up. To acquire even the faintest idea of what that loop does, you have to examine it. Not so with algorithms. Once you see a call to an algorithm, the name alone sketches the outline of what it does.”[0]
It's why in my last C++ job, I spent a lot of time convincing colleagues to use more of the functions in the algorithms library - so that it's easier to see what they're trying to do, and less likely to insert a bug.
Consider languages that have the ~sum~ function. Would you recommend they instead write a for loop? If not, just replace ~sum~ with the Sigma symbol and you have the mathematical notation.
> “When you see a for, while, or do, all you know is that some kind of loop is coming up. To acquire even the faintest idea of what that loop does, you have to examine it. Not so with algorithms. Once you see a call to an algorithm, the name alone sketches the outline of what it does.”[0]
It's why in my last C++ job, I spent a lot of time convincing colleagues to use more of the functions in the algorithms library - so that it's easier to see what they're trying to do, and less likely to insert a bug.
Consider languages that have the ~sum~ function. Would you recommend they instead write a for loop? If not, just replace ~sum~ with the Sigma symbol and you have the mathematical notation.
[0] http://www.drdobbs.com/stl-algorithms-vs-hand-written-loops/...