3 ms·
I suspect that some of the programmers who find the second version better are non-experienced. To them, the first version is not standard C++ code, so it looks
by edanm 16y ago
I suspect that some of the programmers who find the second version better are non-experienced. To them, the first version is not standard C++ code, so it looks as "ugly" as the second version. The second version is cooler (= harder to understand), so they prefer it.
Having said that, the second version written in a better language is pretty standard. It's mostly the limits of C++ which make the "functional" version look so bad, imo.