loading...

re: Is JavaScript truly a functional language? VIEW POST

FULL DISCUSSION
 

You can do functional programming in all general purpose languages nowadays.

I think JavaScript is the best programming language for functional programming of the top 10 most popular languages in use today.

Though I use JavaScript functionally every day, and it's a fantastic language for it, there are a few things on my wish-list that would make it even better.

Some wishlist items include...

  • design-time strong typing (unfortunately TypeScript is modeled on C# and geared for the Object-Oriented paradigm)

  • run-time strong typing

  • read-only input params (the design-time linter helps out here though)

  • first-class JSDoc support for nested lambas

  • callbacks do not play well with FP, but async-await alleviates that

  • the built-in functions have to be converted into free functions, so they can be composable

  • currying a first-class construct

Code of Conduct Report abuse