HackerTrans
TopNewTrendsCommentsPastAskShowJobs

p2501

no profile record

comments

p2501
·قبل سنتين·discuss
Aesthetic aside, I am under the impression that people start programming, by and large, with imperative for/if style => so the imperative style is readable by more people. Even for more experienced programmers, reading imperative probably cost less energy, since it is more internalised?

Futhermore, in JS, the functionnal style is less performant (nearly twice on my machine, i assume because it do less useless memory allocations)

So, same functionnality, readable by more people, more performant? The imperative example seems like the better code.