Though I only came across it today, apparently Philip Wadler's "Why No One Uses
Functional Languages" [1] is a classic paper in the field. It asserts there
are seven major reasons no one uses functional languages (such as ML and
Erlang):
* Compatibility
* Libraries
* Portability & Availability
* Packagability
* Tools
* Training
* Popularity
and two red herrings ("reasons" people give that such languages are unpopular,
but don't actually contribute to their unpopularity):
* Performance
* "They don't get it"
I think Philip hit the nail on the head. It's like he's been reading the J
Forums, rather than the ML (or Erlang, or whatever) Forums. In fact, I don't
think his analysis is limited to functional languages -- the paper has almost
nothing specific to functional languages in it. His 7 features are
make-or-break for any fledgling or obscure language.
So how do we think J fares? In my opinion:
* Compatibility:
Poor. This means talking to the outside world, and while J
has the ability to make arbitrary system calls, very little
is provided in the way of robust, full featured interfaces
to other systems. Compare with, e.g., Dyalog APL, which has
the entire .NET stack available in a namespace, and an APL
program can be deployed as a web application with a single
click, etc.
* Libraries:
Poor to middling. (Now, keep in mind I'm comparing the
system libraries and the nascent JAL to, e.g., the libraries
available in Java, .NET, or Perl. This may improve in time.
OTOH maybe we should be more proactive in improving it.)
* Portability & Availability:
Good. J runs on Windows, Linux, and Apple, and is easy
to install and maintain. That's poor compared to C, but I
doubt anyone's going to ditch J because you can't run it
on an Amiga.
* Packageability:
Middling. We have Package Manager, but
if you read the paper you'll see it would be considered
inefficient by Wadler.
Though I disagree packagability is important. I think
we can consider J like a JVM or the .NET framework: a
platform to be installed separately. Then J applications
can be installed as a directory of scripts (a la JAL) which
build upon the platform. I personally don't think there
would be too much value in a tool which converted a J
installation + application script to a single executable.
* Tools:
Unknown. I don't use the profiler or debugger enough to
know if they're sufficient. But maybe the fact that
I don't use them should tell me something.
* Training:
Excellent. I've never met a more newbie-friendly
programming community than J. We also have the Wiki,
various papers, and several books in print.
* Popularity:
This is the variable I'm trying to solve for.
-Dan
[1] The original paper is available from:
http://homepages.inf.ed.ac.uk/wadler/papers/sigplan-why/sigplan-why.ps
and, for anyoen who doesn't have a PS reader, I've posted a PDF version
here:
http://dan.bron.us/sigplan-why.pdf
(I used the very convenient http://www.ps2pdf.com/ website)
PS: I discovered the paper through the F# FAQ, which says it is designed to be
a functional language that addresses Wadler's complaints:
http://research.microsoft.com/fsharp/faq.aspx#Goals
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm