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

First class functions != Functional programming language



I'm not saying JS is a pure functional language.

It's a fact that you can create functional abstractions in JavaScript. Just like you can in Python and Ruby.


> It's a fact that you can create functional abstractions in JavaScript.

This is basically just restating "Javascript has first-class functions."

While first-class functions are nice, it's only the barest tip of the iceberg when it comes to what's needed for true functional programming. When you add more and stronger assumptions to your functions and types - referential transparency, static typing, immutable data structures - you get more and more back in functional expressive power and the tools that make it possible: memoization, concurrency, tail recursion, lazy evaluation, pattern matching, and so on.

The less assumptions you allow in the language, the more these powerful functional techniques and abstractions simply won't be possible. You still stand to gain from a modular, functional style, but you will have to go back to working around the inherently imperative language in most cases.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: