Hacker News new | ask | show | jobs
by Fraterkes 267 days ago
I know powerful typing features are very important for Haskell in particular, but is static typing considered a functional feature more broadly? Most lisps don't have static typing as far as I know. Clojure was one of the main functional languages that actually saw industry use for a while, and it is dynamically typed.
2 comments

It seems to me that algebraic nominal types are getting strongly attached to functional programming right now. Even on multi-paradigm languages, both idioms tend to come together.

It's not a necessary relation, those things are pretty much independent. Except in that pattern matching and function composition complement each other very well.

"but is static typing considered a functional feature more broadly"

It might be, but it is not an essential feature. Functional programming is the practice of using pure functions as the primary form of computation and composition. Whether one adds types to this is as relevant as adding types to any other paradigm (imperative, oop, logical, functional, etc)

Right, that was my assumption. I asked because the person I replied to mentioned the popularity of dynamic languages as a data-point for the decline in popularity of functional programming.
To drive the point a little further, all of those paradigms encompass both statically typed languages and dynamically typed ones.