Re:Programming Paradigms for Dummies: What Every Programmer ...
by rydel on Tuesday November 06, 2018 @06:31AM
(#18390049)
It depends. As we know, FP is all about not having side effects. Having “for” loop requires to mutate the pointer of given iteration.
[ Parent
| on HN ]
Re:Programming Paradigms for Dummies: What Every Programmer ...
by pjmlp on Tuesday November 06, 2018 @01:50PM
(#18393815)
Oh, and I thought all these years that OCaml was a FP language, go figure!
open Printf;;
printf "After all OCaml isn't a FP language\n";
for idx = 1 to 10 do
printf "%d\n" idx
done
Same goes to Common Lisp, F#, Scala, Clojure.