HNHacker News
TopNewBestAskShowJobs

PolymorphicUser

1 karma · joined February 22, 2015

submissionscomments
PolymorphicUser··on The C language is purely functional (2009)
>Functional programming generally involves a lot of dynamic memory allocations (which are usually optimized in some way)

It's symptomatic of many functional languages, but it's not a prerequisite.

> . C also lacks function closures, so important abstractions like function composition, partial application and higher order functions.

That, on the other hand, is a core feature of functional languages (what does it mean to have functions as first class citizens if one cannot manipulate them in an algebraic way?). I actually think it's the only needed feature to qualify.

> It also lacks type parameterization and polymorphism.

These are strongly typed languages features, I wouldn't define a functional language by it (I don't think it's necessary), although it appears in many of them.