HackerTrans
トップ新着トレンドコメント過去質問紹介求人

p2501

no profile record

コメント

p2501
·2 年前·議論
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.