D. Tweed writes:
> However, the issue that lots of the simple & productive ideas
> from FP are culturally alien & even suspect to programmers in other
> languages is very true. I write lots of stuff in C++ and the fact that I
> have functions returning two results return a pair<T,U> rather than either
> a specially created class or a copy-into-reference-parameter, or that I
> use STL vectors/lists rather than writing inplace code using
> arrays/pointers elicits cries of `Yuck' & `Too weird'. And I agree that
> this is a real phenomenon/problem which may well lead to Haskell remaining
> a language that's scorned (in both senses) and runtime systems which make
> it difficult to do simple Haskell things.
[Written with tongue only halfway in cheek.]
I disagree. "They just don't get it" doesn't cut it anymore.
Proposition
Hackers can like FP.
We give two proofs. First, a lemma.
Lemma
Hackers like weird, obscure, esoteric, complicated stuff.
Proof:
We exhibit a witness.
Consider *NIX. Now there is a big sprawling mess of complicated
interdependent gobbledygook if ever I saw one. And yet it attracts those
critters like honey.
Back to our proposition.
Proof 1:
By contradiction.
Nothing could be more obscure or esoteric to a hacker than FP. (They even
seem to admit it themselves.)
Therefore, by the lemma, hackers can potentially like FP. QED.
Proof 2:
Compared to *NIX, Haskell is cake. A simple functional language can
be axiomatized in a few lines. There are concrete rules for reasoning about
it. There are tangible implementations. That's more than enough.
Therefore, hackers can like FP. QED.
Of course, many hacker sapiens are something less than open-minded. You only
need to look at /. to convince yourself of that. But their weakness is their
fawning admiration of hacker superioris, i.e., gurus and other gung-ho
gift-giving go-getters.
Now, a guru may not know much about adjunctions or omega-CPOs, but gurus are
typically rather open-minded (cause or effect?)---if it gets results, they'll
use it. So, to convert a guru, you need to show them some concrete results. So
write some useful applications, write them fast, write them well, show them to
a guru, and show the guru how to do it too. Then you'll convert the gurus;
convert gurus, and you'll convert their flock. Convert the flock and you're
halfway home. (Just look at the recent announcements about the GNOME
Foundation.)
[Musical interlude:
You can't change the world
But you can change the facts
And when you change the facts
You change points of view
If you change points of view
You may change a vote
And when change a vote
You may change the world.
-- Depeche Mode ("New Dress")
]
And if you _can't_ convince a guru and write better programs faster, then
maybe FP isn't so good after all... unless you plan on writing all the world's
programs yourself.
Unfortunately, I don't see many FP programs that are better or faster than
conventional ones. Those that are are incestuous: things like compilers and
program analyzers for FP languages. Hackers don't need those yet. They need
things like Manuel's Gtk interface, or Daan's DB interface. Then they need to
see them in action, outperforming existing applications in some way.
Of course, IANAH (I Am Not A Hacker) so you may take my hypocritical remarks
with a grain of salt or three.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791