Hacker News new | past | comments | ask | show | jobs | submit login

The biggest downside with doing it in something like JS is you don't have the same under-the-hood optimizations. In functional languages it's not actually going to allocate a whole new array each time an immutable list is appended to, but that's exactly what will happen in JavaScript. But yes I agree, these concepts are showing up everywhere, even if you don't do "FP."



At the end of the day, software always exceeds the ability of the hardware to run it. That's the cyclical nature of our business. Just for myself, I'd rather write to the easiest software methodology and wait a bit for compilers/transpilers/interpreters, etc to be fast enough that it doesn't matter what I write.

In other words, one can't really optimize for the top level (ease of use) and the bottom level (speed) at the same time.

Turing demonstrated that there are only two differences between any computers that have ever existed: how fast they are, and how difficult they are to program.


> In functional languages it's not actually going to allocate a whole new array each time an immutable list is appended to, but that's exactly what will happen in JavaScript.

Efficiency depends on how your js runtime is optimized. Elm works fine, for instance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: