3 ms·
Let's be honest though, there's 0% chance of functional languages becoming mainstream in web development.
by mattmanser 15y ago
Let's be honest though, there's 0% chance of functional languages becoming mainstream in web development.
- rbanffy 15y agoThe canonical way to program for Node.js is very functional.
- burgerbrain 15y agoI would counter by pointing out that while that is true, the sorts of programmers who might use Node.js are dwarfed by the armies of incompetent untrained PHP developers out there. The HN crowd doesn't really give you a good window into reality in this case. I also don't think that languages should worry about becoming "mainstream" for exactly that reason...
- rbanffy 15y agoVery true. Being mainstream also means the language is used for stuff it really shouldn't be used for.
- Zak 15y agoOf 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.