
Immutability and loops - tosh
http://codingrehab.com/posts/2017-07-31-replacing-loops.html
======
cdevs
I was just reading over some examples on the F# website and now this pops up.
I like why functional languages exist I don't like the readability of the
languages. If I find a nice piece of code it's like how John carmack put it
"these small things are just toys" but unfortunately you have to learn them to
be able to read a large production application. the thing is I grew up with C
and variations to scripting and JavaScript and I can jump into nearly any code
and read it if my life depended on it but that's excluding functional
programming although I'm trying at the moment.

Screw classes and hour long design talks? Cool.

make everything immutable? eh ok....

write pure reusable functions? Awesome I'm on board.

ok let's see the language ? Oh it's that car crash of code that I have to jump
all over the place to read what's this variable ? Oh it's a function that
takes a function that takes a function...ok read that 10 more times and I'll
know how this fizz buzz works.

------
gct
> Collections in languages that enforce immutability are optimized for these
> kind of operations so they are very efficient and there is no penalty for
> immutability.

That's just good old fashioned wrong.

~~~
cgmg
Can you elaborate?

------
axman6
This page made my iPhone 5S really sad, scrolling was really laggy - i'm
guessing all the clojure code was using something like clojurescript? If so,
it really didn't need to as it was all static but causes a seemingly really
large amount of computation while scrolling.

~~~
grzm
Likely it is the JavaScript. It looks like many of the code blocks are live,
using Klipse[0], which is a multi-language client-side code evaluator. It's
not ClojureScript specific.

[0]: [https://github.com/viebel/klipse](https://github.com/viebel/klipse)

Edit to add: it _is_ written in ClojureScript, however.

