Re:Tim Bray doesn't know operator precedence rules
by _delirium on Wednesday June 30, 2010 @05:18PM
(#1476277)
I actually find that style considerably less readable, though admittedly I'm quite familiar with C code. It's just less common for one (not the idiomatic way of writing code in the language), but it also emphasizes this tedious loop-iteration-at-a-time interpretation, while the original is easy to read as a sort of Matlab-style single vector operation, once you're used to it ("copy all the srcs to all the dsts").
Plus, once you start piling on a bunch of such code-explosions, you end up with functions that are much harder to scan, because what could've been an easy to scan 8-line function is pedantically written out as this super-explicit 30-line thing.
Instead of adding parentheses, try writing it like this:
It's instantly more readably, it's very obvious what's going on, and you've lost no performance. There's also no parentheses to add.