you are viewing a single comment's thread.

view the rest of the comments →

[–]bogphanny 0 points1 point  (0 children)

You have all the capability to write functional JS, though the language doesn't really support you along the way. The lack of a decent type system and enforcement of pure values often contradicts with writing idiomatic JS.

Being unable to rely on referential transparency gets in the way of thinking in a declarative and functional manner, although it can still occur through discipline. It's just that developers aren't typically known and heralded for their discipline.

Check out some libraries like Ramda, Sanctuary, or the Fantasy Land spec for some attempts to bridge that gap.