2 ms·
Of the languages I mentioned, only Haskell is functional, though I'll concede that Common Lisp isn't very likely to become mainstream either. Lua, on the other
by Zak 15y ago
Of the languages I mentioned, only Haskell is functional, though I'll concede that Common Lisp isn't very likely to become mainstream either.
Lua, on the other hand is a relatively procedural scripting language. It can support functional programming if you want (it has closures and tail-call elimination), but that isn't the default. It doesn't even have map/reduce/filter in the standard library (I think it should).
I also dispute your claim fundamentally. Research-oriented languages like Haskell probably won't go mainstream, but a mostly-functional paradigm is very natural for web development. A GET request is naturally a pure function (it takes an HTTP request and returns a page). A POST can often be purely functional except for the bit at the end where it creates, updates or deletes a value. Languages and frameworks that encourage that style of thinking make it much easier to avoid creating a complex monstrosity.