5 ms·
Plus le change, plus le meme chose. Functional programming has a couple of problems, when it comes to uptake. The first is that you only get 40% of the benefit
by michaelochurch 12y ago
Plus le change, plus le meme chose.
Functional programming has a couple of problems, when it comes to uptake. The first is that you only get 40% of the benefit if you go 90% of the way. (Static typing is the same way, which is why I prefer Clojure's typelessness over the mediocre static typing of Java or C++ or Go.) In that case, the "impure" 10% still causes, if not realized complexity, the potential for complexity that infuriates maintainers.
If you go 90% of the way on FP and get 40% of the benefits, that still means you're writing code faster and generally producing less of it, and those are good things. However, there's a nasty duality in programming which is that saving time on the fun stuff means more time is spent on the un-fun stuff. (If you make writing of code 4 times faster and debugging of nasty interface issues 2 times faster, you spend a larger proportion of your time on the latter.) Unless you can eliminate whole classes of un-fun-ness (e.g. categories of bugs) it's often not worth it. Eliminating 90% of the un-fun-ness just means you're spending more time on that remaining 10%.
For example, Python can be used as a mostly functional language and thereby go 90% of the way (conceptually) to FP, but it isn't. The community has judged it to be not worth it. Scala should be used for FP, but there are plenty of Java++ programmers who still use null instead of Option[T]. Sadly, it doesn't take much of this dysfunctional programming to emasculate FP and leave an unbiased person asking, "Why bother?" It might not even be the right way to go, for a maintenance project. Mixing two styles is going to make it more illegible than using the existing (if suboptimal) style for new changes and work.
The career issues noted are also huge. The average Clojure or Haskell developer makes slightly than the average Java developer, but if you control for skill and compare at-level, the Java or C++ developer wins. A 1.8 Java developer (scale here: http://michaelochurch.wordpress.com/2013/04/22/gervais-macleod-23-the-shodan-programmer/ http://michaelochurch.wordpress.com/2013/04/22/gervais-macle...) makes $175,000 and turns down invitations into VP-level positions at major corporations on a regular basis, because 1.6+ Java developers are just so rare. A 1.8 C++ developer can make $500,000 per year at a hedge fund. The 1.8 Haskell or Clojure developer makes about $125,000 on average, which is not bad but hardly stratospheric. This tends toward a self-perpetuating exaggeration of historical discrepancies in language popularity. Even if the average Haskell job is better, Haskell jobs (at all) are much harder to get, and Haskell jobs that pay as well as even an upper-middle Java job are extremely rare. The market is just stronger for Java people, so that keeps people wanting to use it, which keeps the majority of companies preferring it over better languages because they fear maintenance risk more than low productivity.
I'm less charitable than Wadler on the "they don't get it" angle. Certainly there are smart people who "get" functional programming and have good reasons not to use it. Still, I do think that a contributing factor to FP's lack of uptake is the anti-intellectualism of the programming world.
It's not that anti-intellectuals have some natural inclination toward Java or C++. The anti-intellectuals have the general attitude that language doesn't matter. And then they pick Java for some risk-averse, enterprisey shitfuck reason like maintenance risk or lack of an available developer pool, both of which are just business stinginess ("we don't want to train people"). What makes them vile is not their tastes in languages (there is a lack of taste in the Java community but, even still, there are cases where Java is the absolute right language to use) but the fact that they don't take programmers' concerns (such as tooling choices) seriously at all, and prioritize manager-type concerns over the needs of the people actually doing the fucking work.
- codygman 12y agoI have never seen Java developer position for $175,000 and especially haven't seen anything about a C++ developer making $500,000. I'm not saying I don't believe you, more that I'm in disbelief; Do you have any sources?
- petilon 12y agoGood HFT (High Frequency Trading) programmers make $500K or more, see: http://beta.slashdot.org/comments.pl?sid=2357190&cid=36936764 http://beta.slashdot.org/comments.pl?sid=2357190&cid=3693676...
- yummyfajitas 12y agoThe anti-intellectuals have the general attitude that language doesn't matter. This attitude should not be discounted. You'll find fewer proponents of strong type systems than me. I recently started working with a client who wanted to build a Haskell system in order to do some complex financial modelling. I told them to forget Haskell and build a Python/Django app that will handle 90% of their customers. The only significant bug was comparing a backward discounted quantity to a forward discounted quantity. Haskell wouldn't solve that. The development effort saved due to not rewriting built-in django apps vastly outweighed any productivity benefit we'd have gotten from using Haskell.
- collyw 12y agoA friend started a company a couple of years back. He was not a programmer, but worked in a lab, so knew the bioinformaticians favored Python. He insisted that the app was built in Python. I was thinking that the language didn't really matter. Anyway, a couple of years later he got a grant to continue with the project. It was junior level wages. And he couldn't get a Python programmer to work for that (he asked me) amongst others. PHP would have probably opened up more options in that respect, even though it is considered a poorer choice of language.
- michaelochurch 12y agoI told them to forget Haskell and build a Python/Django app that will handle 90% of their customers. That's not anti-intellectualism. It's practicality. The "right tool for the job" isn't always the same language. Often it's Python, because the libraries are mature. Machine learning is one area where this is often true. Python itself doesn't seem like it should be a leading ML language, but it's far ahead of the competition in terms of library support (e.g. Numpy, Scipy, Pandas, et al).