4 ms·
That's always a fun subject for a late night argument at the pub. When I was in school (1990s), simply having first-class procedures was good enough for most p
by mumblemumble 5y ago
That's always a fun subject for a late night argument at the pub.
When I was in school (1990s), simply having first-class procedures was good enough for most people to consider a language functional. I'd assume that's roughly the definition being used here.
But you go back to 20 years before that, and it wasn't totally unheard of to see higher-order functions in procedural languages (such as Algol 68) and object-oriented languages (such as Smalltalk). And you fast forward 20 years, and about the only language without some form of first-class procedures that's still allowed to exist seems to be C. And in the middle there's always been Python.
You could go all purist and say that, since John Backus coined the term, we should stick with his definition. In that case lisps are definitely out (he explicitly said so in his paper), and it's possible that the only genuine examples are Miranda, Haskell and friends, because even allowing mutation or an imperative style will disqualify you. But I'm not sure everyone really wants to snub Robin Milner like that.
It's almost like it's an ill-defined term with fuzzy boundaries that means whatever the person currently using it wants to tell you they meant by it, and trying to be pedantic about it is mostly just a good way to have a frustrating conversation. Kind of like just about every adjective that can be used to describe programming languages.
- nvarsj 5y agoI thought Miranda/Haskell were much more in the vein of Lisp/Lambda Calculus than Backus's ideas, which were more radical and not widely adopted to this day [1]. I always thought of Haskell as simply what Lisp would be if it had implemented a typed lambda calculus rather than an untyped one. 1: https://en.wikipedia.org/wiki/Function-level_programming https://en.wikipedia.org/wiki/Function-level_programming