Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The prejudice of programmers is one of the biggest hindrances of technological advancement in computing AFAIC.

Think about it: currently, functional programming is, finally, getting some well deserved recognition in the wider programming world.

Yet almost everything it presents has been present in programming for as much as 45 years. The original paper on Hindley's type system was published in 1969. Milner's theory went to print in 1978. Scheme first appeared in 1975 and was already building off functional ideas that had been spawned by earlier Lisps. Guy Steele designed an actual Scheme CPU in hardware in 1979.

And yet even today, a non-trivial number of programmers react with absolute horror at the idea of a Lisp (usually based solely on ignorant trivialities like the parens-syntax), more or less exactly as your C programming classmates did in 1995, and while FP is starting to gain major inroads in some spheres, others dismiss the whole field as wank and Java and C remain kings that are unlikely to be unseated for another decade at a minimum, if ever.

We remain utterly bound to one model of hardware, one model of programming, and largely, only a couple models of operating system, after decades of development, because so many programmers react with horror at anything they're unfamiliar with or that deviates from the percieved norm, be it in features, syntax, or focus.

And God forbid you make anything that might actually be easy for non-programmers to learn. It will be more or less met with instant and persistent scorn, and its users derided and outcast, simply because they didn't use a 'Real Programming Language' like C. Go ask a BASIC coder what life has been like for the last 40 years, or a game dev who worked in AGS or GameMaker prior to the last half decade or so. Hell, I have a friend who still sneers at visual layout designers.

The divide described in the article is very much culturally enforced as much as economically.



> Think about it: currently, functional programming is, finally, getting some well deserved recognition in the wider programming world.

People assume that functional wasn't used because of programmer prejudice.

Why don't people assume that functional wasn't used because there were good reasons not to use it?

Imperative programming lives in a world where CPU cycles and memory are scarce. Gee, once CPU and memory became abundant and free, people started using functional programming. Go figure.


The divide described in the article is very much culturally enforced as much as economically.

Statements of this kind trouble me every time I see them, last time yesterday in the discussion about Greece.

I guess Marx's ideas aren't very popular over here. But implying that economy and culture need to be mentioned separately seems at least a little naive.

More fundamentally, you're ignoring the huge difference in power between consumers (in this case the programmers) and the people that create the tools and take them to market.


Actually, what I mean by that is rather the difference in power between the guys doing the coding, and the guys making the business decisions.

Both tend to enforce that divide, but for very different reasons; the coders for cliquish reasons as I described, and the business guys like Apple for the reasons in the original link.


The coders can't really enforce anything. We have opinions and fall in groupthink indeed. But the mere fact that there are different tools is obviously caused by the people and organizations that create them.


Bologna. Plenty of programmers are constantly searching for the new new thing, obviously (ahem hn). It's mostly the maintenance types of people who are prejudiced, and they aren't just programmers.


its not just a language issue, there is a divide amongst platforms too. You can use the same language and you will find people who will still talk down or ignore your points because of platform or language choice.

it is bizarre


And God forbid you make anything that might actually be easy for non-programmers to learn. It will be more or less met with instant and persistent scorn, and its users derided and outcast, simply because they didn't use a 'Real Programming Language' like C.

Prejudice doesn't seem to have anything to do with it. Functional programmers think differently, and what's obvious to the Functionals isn't to the Statefuls. And the Statefuls are currently most of the world. I've flip-flopped myself, because while I love the elegance of being a Fucntional, being a Stateful is just so much more productive. There are a few reasons for this: If I want to make a game, there's no good functional framework. If I want to write a script to get something done, like download a webpage, my goto language is Python because I know for a fact that their libraries work and that their documentation is almost always stellar. Contrast that with Lisp where you can spend at least a day just getting the environment set up in a way that asdf doesn't hate. Especially on Windows. (Yes, if you want to make games, Windows needs to support your dev environment.) My info about asdf is a couple years out of date, because to be honest I haven't felt inclined to look into it again after some bad experiences.

Haskell could be wonderful. Never tried it. Will someday. Until then, I'd love some sort of competition where a Haskell programmer and myself are given a task, like "write a script to X," where X is some real-world relevant task and not an academic puzzle, and see who finishes it first. It would be illuminating, since I'd give myself about a 30% chance of finishing first, but it would reveal what I'm lacking.

Arc had potential. It really did. Everyone just gave up on it, and it never attracted the kind of heroic programmers that Clojure did.

So the wildcard seems to be Clojure. It's a decent mix of performant, practical, and documented.

I'm out of time to pursue this comment further, but the main point is just that FP's problems have very little to do with societal acceptance or scorn. If you're running into that, you're probably running with a bad crowd anyway. It's mostly because imperative languages are popular, so network effects mean they'll just get better and better. If FP wants to chip away at that, it'll need to start off better and stay better. "Better" is many things, but it includes performance, cross-platformability (yes, Windows is necessary), documentation, and practicality (the ability to quickly accomplish random tasks without a huge prior time investment, Python seems to be the best at this so far).


> Haskell could be wonderful. Never tried it. Will someday. Until then, I'd love some sort of competition where a Haskell programmer and myself are given a task, like "write a script to X," where X is some real-world relevant task and not an academic puzzle, and see who finishes it first. It would be illuminating, since I'd give myself about a 30% chance of finishing first, but it would reveal what I'm lacking.

I think one of Haskell's biggest marketing problems is that its strong points (strong static types + separation of side effects) aren't all that important in scripts (or any program that's small enough to fit in someone's head in its entirety), which makes it difficult to convince people of its merits in reasonably-sized examples.

What Haskell gives you are good, solid abstraction boundaries that you cannot accidentally break, and the ability to refactor code with a high degree of confidence that it's still going to work fine afterwards.

Neither of those are particularly helpful for any program that you might write in a competion, but both are incredibly important in day-to-day software development.


My apologies, that portion of my point was meant to be independent of the FP comparison. It is absolutely true that, save for the occasional grudging exception, the 'easy languages' have largely been scorned and shunned throughout programming history. Hell, I've been guilty of it myself where HyperTalk is concerned despite loving the concept.

As for "getting work done" in Lisps/FP, I earnestly recommend checking out Racket. The developers have said that they've aimed to create 'the Python of Lisps' and by and large they've succeeded at exactly that. The documentation is thorough, the functional tools live alongside OOP and imperative ones quite nicely, the standard library is enormous, and DrRacket makes for a very good 'just open up the damn editor and start writing' tool.

Really, most of the FP languages are much more multi-paradigm friendly than Haskell, to the extent that I wouldn't even consider CL a functional-first language at all. CL's problems there are more a lifetime of neglect + Emacs loyalty, though Allegro and LispWorks offer more 'everyone else' friendly options. F# is fantastic as well, and integrates nicely with the rest of .NET and allows for a mixed paradigm while still getting all the functional tools and the power of type inference on top.


> Contrast that with Lisp where you can spend at least a day just getting the environment set up in a way that asdf doesn't hate.

I recently re-installed my OS and setting up my Lisp environment (SBCL, Quicklisp, SLIME+Emacs) took about 30 minutes.


Yeah, download SBCL, load quicklisp.lisp, done.

I don't see what the problem is on Windows.


Several years ago SBCL was unusable for game programming on windows due to crashes. I tried and eventually gave up.

My info is out of date though. Maybe it's better now.


I've not had any issues with SBCL on Windows except with the thread support.


> Stateful is just so much more productive. There are a few reasons for this: If I want to make a game, there's no good functional framework.

> my goto language is Python because I know for a fact that their libraries work and that their documentation is almost always stellar.

> It's mostly because imperative languages are popular, so network effects mean they'll just get better and better.

This claim makes it seem like imperative/stateful is more productive because of functional itself:

> I've flip-flopped myself, because while I love the elegance of being a Fucntional, being a Stateful is just so much more productive

All of your other comments seem to be "imperative/stateful is more productive because of popularity, docs, and libaries".

Are you claiming both of those are true? Weakly claiming the first, strongly the second? Could you elaborate?


No no, I'd never claim something as foolish as FP is inherently less productive. It's the opposite in my experience. Once you have a bunch of libraries and utility functions that you know how to use, you'll wipe the floor with any stateful programmer. The hard part is getting to that point. I'll elaborate more in an edit when I'm home in like 30 minutes.

EDIT: Maybe a little longer.


I'm short on time, but my main point was just that if you're already a stateful programmer, it's difficult to become productive when switching to functional programming due to a combination of factors. FP isn't inherently more difficult than stateful programming. It's simply that stateful programmers have already spent the time to become productive, whereas switching to FP requires another time investment in terms of learning a new mindset, getting a programming environment set up, learning how to exploit the environment (how to be "fiercely effective"), learning which libraries to use and how to find them and set them up, and most importantly: deployment. Deploying native apps in stateful languages has seemed easier for some reason, whether it's python or C or whatever else. I tried to use lisp for gamedev, but it became a nightmare to figure out how to actually deploy everything including libraries along with all dependencies. The end result of deployment needs to be a program that's launchable by double clicking on an icon, which seemed difficult. (Again, my info is out of date, so maybe things are much better now.)

So it's just a combination of mindset change plus a different "context" for programmers to get used to. That, along with deployment problems and sometimes lack of documentation, leads to a lack of incentive for anyone to make the switch. Since stateful is more popular, it's almost always better for productivity to start and stay a stateful programmer. However, for personal skill level, everyone needs to become a functional programmer for at least several months and try to develop production apps with it. Who knows, you'll probably get much further than I did, and figure out a way to convince all your friends to make the switch too.


or maybe, just maybe its all about PERFORMANCE.

Very recently computers got to the point where we can afford to write slow code, this is the reason higher level people are coming out of the woodwork.


Yeah, everything pretty much fell apart in 1958 with that stinking mccarthy. Since then trying to write any performant code meant dealing with an innane chatter of closures and inheritance and parametric polymorphism. Maybe, if we're lucky, computers will get slow again and performance will matter.


Coincidentally, I spoke at length with a grad student software developer for the RoboCup challenge in which autonomous robots compete. In this particular league, Nao robots are supplied to each team as the standard, making the performance emphasis on software that runs in the robot.

So I asked the developer, does he use the famous ROS software for running the robot. He said, no way, because the robot had only an onboard Intel Atom of relatively low performance, all the complex multi-threaded behavior had to be written in low-level C. No space nor execution time for anything more.


I'll bet you a nickel that grad student didn't learn about complex multi threaded behavior in low level C. His challenge was to take a high level concept and express it in a resource constrained environment.

Of course there is a need for freestanding C. But for every one of him there are a hundred developers using c++ or java or javascript. They may not appreciate the power of working in such high level languages, but the vast majority of developers work in HLLs.


Were it really performance-critical, the software would have been written in assembly.

There. Top that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: