Follow-up to “Functional Programming Doesn’t Work”
Programming in the 21st Century - James Hague - December 30, 2009Not surprisingly, Functional Programming Doesn’t Work (and what to do about it) started some lively discussion. There were two interesting “you’re crazy” camps:
The first mistakenly thought that I was proposing fixing problems via a judicious use of randomly updated global variables, so every program turns into potential fodder for the “Daily WTF.”
The second, and really, the folks in this camp need to put some effort into being less predictable, was that I’m completely misunderstanding the nature of functional programming, and if I did understand it then I’d realize the true importance of keeping things pure.
My real position is this: 100% pure functional programing doesn’t work. Even 98% pure functional programming doesn’t work. But if the slider between functional purity and 1980s BASIC-style imperative messiness is kicked down a few notches—say to 85%—then it really does work. You get all the advantages of functional programming, but without the extreme mental effort and unmaintainability that increases as you get closer and closer to perfectly pure.
That 100% purity doesn’t work should only be news to a couple of isolated idealists. Of the millions of non-trivial programs ever written—every application, every game, every embedded system—there are, what, maybe six that are written in a purely functional style? Don’t push me or I’ll disallow compilers for functional languages from that list, and then it’s all hopeless.
“Functional Programming Doesn’t Work” was intended to be optimistic. It does work, but you have to ease up on hardliner positions in order to get the benefits.
Categories: Blogs Programming in the 21st Century
Erlang on Twitter
» asabil (Ali Sabil): RT @FrancescoC: Soundrop’s co-founder and CTO @asabil is speaking at the 2013 Erlang User Conference in Stockholm.
» vaaaaanquish (ばんくし): RT @dll7: erlangとnode.jsだったらどっちが負荷に耐えるかと言われたら微妙
» oleavr (Ole André V. Ravnås): RT @FrancescoC: Soundrop’s co-founder and CTO @asabil is speaking at the 2013 Erlang User Conference in Stockholm.
» dll7 (量産型HOMO弐号機): erlangとnode.jsだったらどっちが負荷に耐えるかと言われたら微妙
» jprieur (Johann Prieur): RT @FrancescoC: Soundrop’s co-founder and CTO @asabil is speaking at the 2013 Erlang User Conference in Stockholm.
» KikuMlosch (Kiku Mlosch): RT @erlangfactory: Learn from @Klarna ‘s experiences reimplementing a major component from #Erlang to Erlang - @dklee talks at #EUC 2013 ht…
» RexyRosano (Rexy Ariffullah R.): @_Uncle__D handstand bukan jurusan ku, itu jurusan erlang
» zkessin (Zach Kessin): Is there a way to tell if an #erlang module implements a specific behaviour
» bagus_erlang (Bagus erlanggono): Test 123
» soErlang (Katarzyna Kraus): RT @ErlangSolutions: Talking with Joe Armstrong (@joeerl) about all manner of #Erlang stuff -in Episode 4 @mostlyerlang http://t.co/er1Y8Ff…
Statistics
Number of aggregated posts: 10650
Most recent article: May 20, 2013
Latest comments
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…