5 ms·
Immutability and loops
- deleted 9y ago[deleted]
- gct 9y ago> 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 9y agoCan you elaborate?
- axman6 9y agoThis 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 9y agoLikely 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.
- Reefersleep 9y agoIt's not static. You can edit the code blocks and see the results.
- cdevs 9y agoI 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.