3 ms·
>Functional programming generally involves a lot of dynamic memory allocations (which are usually optimized in some way) It's symptomatic of many functional la
by PolymorphicUser 12y ago
>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.
- mmf 12y agoIf I get the point of the article, the author would argue that cpp provides some form of closure (you can code a macro that generates a function that behaves somewhat like a closure if you want...)