News for hackers. Stuff that matters.
Re:Beautiful JavaScript – Functional JavaScript by agumonkey on Sunday December 25, 2016 @05:58PM (#13255858)
I believe lots of people used FP to write short and correct programs; then they profile and tweak the bits that needs it.

Also, are you using javascript native .map method ? IIRC libraries like lodash or ramda, through use of reducers, have vastly faster idiomatic FP performance. Mostly because they avoid successive array allocation.

Re:Beautiful JavaScript – Functional JavaScript by mudbutt on Sunday December 25, 2016 @09:43PM (#13256636)
Sorry for being an idiot, but when you reducers you don't mean the native .reduce do you?
Re:Beautiful JavaScript – Functional JavaScript by agumonkey on Monday December 26, 2016 @08:03AM (#13258087)
I'm not even sure it's reducers or transducers. It's mostly a type of functions, not the Array.reduce method. These function don't operate directly, they're meant to be recomposed later by the library. You can [].map(f).map(g).filter(h) and the system will "merge" f, g and h as a one step function that iterate once over the original data and without multiple array allocation. That's my partial understanding, there might be other subtleties.
Re:Beautiful JavaScript – Functional JavaScript by wbercx on Monday December 26, 2016 @07:00PM (#13260430)
I think you're talking about shortcut fusion.