Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why aren't functional languages mainstream?

16 views
Skip to first unread message

m i k e r i x . e r i c s s o n . s e

unread,
Feb 13, 2003, 3:29:28 AM2/13/03
to
To relate to the discussion "Why isn't Haskell mainstream?" we have to face the
fact that few, if any, functional languages are mainstream. Attempts by the
FP community to show the oposite have been unfortunately failed. For example
Phil Wadler's "Functional Programming in the Real World" list
http://www.research.avayalabs.com/user/wadler/realworld/ is a brave attempt,
but the small number of entries rather shows that FP isn't in the real world.
A similar list with Java, C# or any of the later languages would be impossible to
produce because it would be just too large.

A ray of hope for us devotees is Erlang http://www.erlang.org . Traffic on the
"Erlang Questions" mailing list (see http://www.erlang.org/faq.html for
instructional of how to join) is increasing month by month and we we see reports
of the commercial use of Erlang in diverse application far removed from telecom,
for example banking. As you might expect a many of these applications focus
on problem areas with a lot of explict concurrency and distribution.

To revert to the origional question, Why isn't FP mainstream? Hardly through
lack of education (courses) and books! FP is on the curriculum of most civilised
computer science degrees. I suspect that most students regard it as I regarded
learning Latin in school, an activity which is supposed to be good for you and
where you need to pass the exams to get your degree, but otherwise a bloody
waste of time.

The real reason that FP is not accepted is less subtle. Many software projects
genuinely fail. It is not uncommon for engineering projects to be delayed and
run over budget, but most engineering projects do produce some form of
workable result. E.g. of the number of bridges designed each year, very few
in fact fall down. However, it is not uncommon that software projects totally
fail. To be blamed for such a failure is not career enhancing. If you have
introduced a new technology into a software project and the project doesn't
deliver, you can be fairly confident that you will left carrying the can.
There are main other things which can cause a project to fail appart from
the choice of language for example bad organisation, to many programmers,
unclear or unstable specifications etc. But the thing which causes a project to
fail and what gets the blame are two very different things. Faced with this
situation, even the most FP enthusiastic managers don't allow the use of FP.

/mike

Darius

unread,
Feb 13, 2003, 2:09:28 PM2/13/03
to
m i k e @ e r i x . e r i c s s o n . s e (Mike Williams) wrote in message news:<b2fl18$qvn$1...@news.du.uab.ericsson.se>...

...

> The real reason that FP is not accepted is less subtle. Many software projects
> genuinely fail. It is not uncommon for engineering projects to be delayed and
> run over budget, but most engineering projects do produce some form of
> workable result. E.g. of the number of bridges designed each year, very few
> in fact fall down. However, it is not uncommon that software projects totally
> fail. To be blamed for such a failure is not career enhancing. If you have
> introduced a new technology into a software project and the project doesn't
> deliver, you can be fairly confident that you will left carrying the can.
> There are main other things which can cause a project to fail appart from
> the choice of language for example bad organisation, to many programmers,
> unclear or unstable specifications etc. But the thing which causes a project to
> fail and what gets the blame are two very different things. Faced with this
> situation, even the most FP enthusiastic managers don't allow the use of FP.
>
> /mike

This is the common joke/axiom: "No one ever got fired choosing C++"
and most concede that there is at least a partial connection between
the "fall" of AI and the "fall" of Lisp. The question isn't "What's
wrong?" but "What can be done about it?". There's a related question
though, "What's wrong when it's tried?". Are some FP enthusiastic
managers bringing FP in to a project with a bunch of imperative
programmers? generating code like (from Tackling the Awkward Squad):

count :: Int -> IO Int
count n = do r <- newIORef 0
loop r 1
where
loop :: IORef Int -> Int -> IO Int
loop r i | i > n = readIORef r
loop r i | otherwise = do v <- readIORef r
writeIORef r (v+i)
loop r (i+1)

Joachim Durchholz

unread,
Feb 20, 2003, 3:40:20 PM2/20/03
to
Mike Williams wrote:
>
> To revert to the origional question, Why isn't FP mainstream? Hardly through
> lack of education (courses) and books!

But it's still related to educational issues: People who had FP in their
curriculum haven't (yet) been in a position to decide on the language.
Also, remember that such decisions are rare. Most shops (teams) decide
this once, when they are founded; the decision is rarely if ever
reversed (and only if the previous language is generally detested by the
majority of the team - which is rare, because team members rather quit
than try to propose a new language).
I once worked on a team that was using an incredibly bad language (RPG
IV). They were proud to use it, and believed they were more productive
than other teams! (Actually they were, but this was because they didn't
have legacy code to maintain, not because of language choice.) I left
that team instead of trying to preach the unwilling masses... and I'm
pretty sure that they still do RPG today.

Regards,
Joachim
--
This is not an official statement from my employer.

m i k e r i x . e r i c s s o n . s e

unread,
Feb 21, 2003, 3:55:09 AM2/21/03
to
In article <3E553D34...@gmx.de>,

Joachim Durchholz <joac...@gmx.de> writes:
|>
|> But it's still related to educational issues: People who had FP in their
|> curriculum haven't (yet) been in a position to decide on the language.

I don't think that this is true. Scheme & ML (and Prolog) have been used
in university education for so long now that many people who have used them¨
have attained managerial position of reasonable influence in industry.

As I said previously, it is the fear of being left "carrying the can" for
failed projects that prevents people from risking the introdcution of non
mainstream technology. As soon as a technology is regarded as mainstream
for some (often bizare) reason, suddenly everybody is "doing it".

Examples:

Java (Sun created the perception that this was the solution to C++ problems)
UML (don't know)
Linux (A lot of big companies are pushing Linux as a way into the server market)

Some technologies nearly make it, but floped because of bad perception:

Pascal (regarded as slow due to UCSD implementation)
Lisp (tied up with AI which never really made it)
Ada (took too long time to get compilers which worked)
Prolog (also tied up with AI)
OS2 (was better than Windows but somehow seemed proprietary)

I think that Erlang is the only FP language which shows any promise of reaching
"critcial mass". But then I'm somewhat predudiced....


/mike

Ketil Malde

unread,
Feb 21, 2003, 4:33:42 AM2/21/03
to
m i k e @ e r i x . e r i c s s o n . s e (Mike Williams) writes:

> Some technologies nearly make it, but floped because of bad perception:

> Pascal (regarded as slow due to UCSD implementation)

Well, I'd say that Turbo Pascal and later, Delphi, certainly were
mainstream.

> Lisp (tied up with AI which never really made it)
> Ada (took too long time to get compilers which worked)

Saying that these "flopped" is too harsh, IMHO. They were (and are)
quite successful in their niches.

> I think that Erlang is the only FP language which shows any promise
> of reaching "critcial mass". But then I'm somewhat predudiced....

Critical mass for what? It seems to have plenty of support (people
and technology) for building serious applications, what else do you
want? "Erlang for Dummies" on the shelves? :-)

-kzm
--
If I haven't seen further, it is by standing in the footprints of giants

Torben Ægidius Mogensen

unread,
Feb 21, 2003, 10:02:19 AM2/21/03
to
m i k e @ e r i x . e r i c s s o n . s e (Mike Williams) writes:

> In article <3E553D34...@gmx.de>,
> Joachim Durchholz <joac...@gmx.de> writes:
> |>
> |> But it's still related to educational issues: People who had FP in their
> |> curriculum haven't (yet) been in a position to decide on the language.
>
> I don't think that this is true. Scheme & ML (and Prolog) have been used
> in university education for so long now that many people who have used them¨
> have attained managerial position of reasonable influence in industry.
>
> As I said previously, it is the fear of being left "carrying the can" for
> failed projects that prevents people from risking the introdcution of non
> mainstream technology. As soon as a technology is regarded as mainstream
> for some (often bizare) reason, suddenly everybody is "doing it".
>
> Examples:
>
> Java (Sun created the perception that this was the solution to C++ problems)
> UML (don't know)
> Linux (A lot of big companies are pushing Linux as a way into the server market)
>
> Some technologies nearly make it, but floped because of bad perception:
>
> Pascal (regarded as slow due to UCSD implementation)

Turbo Pascal etc. were quite fast and very much in use. IMO, what
killed Pascal was:

1) No good _free_ compilers.
2) I/O not standardized beyond sequential file access.
3) Compilers adding mutually incompatible extensions, reducing
portability.

> Lisp (tied up with AI which never really made it)

LISP is in mainstream use, though not as much as it could have been.
A main reason is (more so than Pascal) a perception of low speed and
masive memory use ("LISP programmers know the value of everything, but
the cost of nothing").

> Ada (took too long time to get compilers which worked)

Indeed. But I would still consider it mainstream, and it is much in
use in safety-critical (or military) applications.

> Prolog (also tied up with AI)

And also suffering from lack of early standardization of i/o etc.

> OS2 (was better than Windows but somehow seemed proprietary)

Not a language, but the reason it died was because MS actively kept
Windows incompatible.

> I think that Erlang is the only FP language which shows any promise
> of reaching "critcial mass". But then I'm somewhat predudiced....

Erlang certainly has the advantage of originating in a large
industrial corporation that didn't question its use in internal
projects (i.e., avoiding the "carrying the can" problem you outlined
above). And the openness of Ericsson has allowed it to move outside
the company. If a major corporation would actively push, say SML or
Haskell, these could very well become mainstream. Haskell may have
problems with space behaviour being hard to predict, though, which
would limit acceptance. SML doesn't have this problem, though.

Torben

Faust

unread,
Feb 22, 2003, 10:08:52 PM2/22/03
to
Joachim Durchholz <joac...@gmx.de> writes:

> Mike Williams wrote:
>> To revert to the origional question, Why isn't FP mainstream? Hardly
>> through lack of education (courses) and books!

1. When undergrads are exposed to functional languages, they are
often taught poorly.

2. Most undergrads are average and are not willing to look beyond "the
languages used in industry" .

3. Many universities are backward.

A notorious example:
I am told that as recently as 10 years ago, UWS ( possibly the worst
university in Australia ) was teaching 1st years COBOL and RPG because,
"someone has to maintain it"

More likely that the skills set of their faculty was limited.

Recently I spoke to a nephew who is doing an computer science + business
course at Macquarie Univerity ( perhaps the second worst university
in Australia ). He is about to start his 3rd year. All he has every
programmed in is Java. No FP at all..

On the otherhand, Sydney Uni , NSW Uni and UTS do expose their undergrads to
FP )
--

natsu-gusa ya / tsuwamono-domo-ga / yume no ato
summer grasses / strong ones / dreams site

Summer grasses,
All that remains
Of soldier's dreams
(Basho trans. Stryk)

Faust

unread,
Feb 22, 2003, 10:13:03 PM2/22/03
to
m i k e @ e r i x . e r i c s s o n . s e (Mike Williams) writes:

> Some technologies nearly make it, but floped because of bad perception:
>
> Pascal (regarded as slow due to UCSD implementation)

It was a mainstream language for a long time and influenced Modula-2 and
Ada.

> Prolog (also tied up with AI)

Borland helped to kill it off with their truly appaling Turbo Prolog.


> I think that Erlang is the only FP language which shows any promise
> of reaching "critcial mass". But then I'm somewhat predudiced....

I seem to recall reading that Ericcson have "banned Erlang" for new
development. I think that this was on one of Joe Armstrong's slides...

Eric Merritt

unread,
Feb 24, 2003, 11:15:26 PM2/24/03
to
>
> > I think that Erlang is the only FP language which shows any promise
> > of reaching "critcial mass". But then I'm somewhat predudiced....
>
> I seem to recall reading that Ericcson have "banned Erlang" for new
> development. I think that this was on one of Joe Armstrong's slides...

I am pretty darn sure that this is not the case at all. I have,
however, posted a notice to the erlang list asking for confirmation.
In any case, even if they have banned Erlang from new development
within Ericcson, it is still in use on large existing projects. For
that matter, there are quite a few other companies using it for
existing and new development. Also, the language itself continues to
be developed heavily. To go back to the original topic, I would lump
Ocaml into the group of FP languages with a good chance of gaining
that critical mass.

Ulf Wiger

unread,
Feb 25, 2003, 7:18:17 AM2/25/03
to
cybe...@yahoo.com (Eric Merritt) writes:

> >
> > > I think that Erlang is the only FP language which shows any promise
> > > of reaching "critcial mass". But then I'm somewhat predudiced....
> >
> > I seem to recall reading that Ericcson have "banned Erlang" for new
> > development. I think that this was on one of Joe Armstrong's slides...
>
> I am pretty darn sure that this is not the case at all. I have,
> however, posted a notice to the erlang list asking for confirmation.

It's actually a matter of record, so there's not much point
trying to pretend otherwise:

http://www.ericsson.com/cslab/publications/bjarnelic.pdf

Page 37: "In February 1998, Erlang was banned within Ericsson
Radio AB (ERA) for new product projects aimed for external
customers..." (Read the paper -- it's really good.)

Open Source Erlang was released in December 1998 and has
enjoyed a growing user base ever since. Nearly 16,000
downloads (incl. Wings3D) during December 2002.

Ericsson is still using Erlang and has used it for new
products since then. The AXD 301 and the GPRS nodes are
Erlang-based and will be around for years to come. This
amounts to millions of lines of Erlang code in
production use.

/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson AB, Connectivity and Control Nodes

Faust

unread,
Feb 25, 2003, 8:32:25 AM2/25/03
to
cybe...@yahoo.com (Eric Merritt) writes:

> existing and new development. Also, the language itself continues to
> be developed heavily.

It is an excellent language.
I was pleasantly surprised today to find how easy it is to write a RPC server
in it.

Joachim Durchholz

unread,
Feb 25, 2003, 8:55:48 AM2/25/03
to
Ulf Wiger wrote:
>
> Page 37: "In February 1998, Erlang was banned within Ericsson
> Radio AB (ERA) for new product projects aimed for external
> customers..."

The paper also states that the primary reason was that a proprietary
language doesn't get enough third-party support.

> Open Source Erlang was released in December 1998 and has
> enjoyed a growing user base ever since.

Hmm... this could have been a direct consequence of the criticism that
lead to the banishment of Erlang from ERA.

Can anybody confirm or dismiss this theory?

Ulf Wiger

unread,
Feb 26, 2003, 6:17:15 AM2/26/03
to
Joachim Durchholz <joac...@gmx.de> writes:

> Ulf Wiger wrote:
> > Page 37: "In February 1998, Erlang was banned within Ericsson
> > Radio AB (ERA) for new product projects aimed for external
> > customers..."
>
> The paper also states that the primary reason was that a
> proprietary language doesn't get enough third-party support.

In Ericsson, an often used term is "the PLEX trap". Ericsson's
telecom switch AXE is designed using a proprietary language
called PLEX. I'm convinced that one of the reasons why AXE
became the dominant product in its niche was the power of the
PLEX language (for its time); another was the excellent
architecture of the AXE. PLEX is a form of high-level assembly
for the (also proprietary) Ericsson APZ processor, and in time
it became cumbersome to have to develop your own micro-processors,
language and tools. It was also not regarded that well by the
market, which asked for open systems and mainstream software
technology. Furthermore, few programmers are interested in
applying for PLEX programming jobs per se, since it doesn't
improve their resume.

(It should of course be noted that the AXE remains a very
profitable product to this day.)

To many in Ericsson, Erlang was seen as "another PLEX".
The fact that Erlang uses mainstream OS:es like UNIX and
Windows could not, in their minds, outweigh the fear that
recruiting programmers would be difficult.

> > Open Source Erlang was released in December 1998 and has
> > enjoyed a growing user base ever since.
>
> Hmm... this could have been a direct consequence of the
> criticism that lead to the banishment of Erlang from ERA.

To some extent yes. More important was the realization that
(a) Ericsson is not in the business of making and selling
software development tools, and (b) Erlang was in fact an
important technology for Ericsson, as it was being used in
important products. As we had no particular interest in
marketing Erlang for profit, but wanted it to prosper,
making it Open Source was a logical step. And a lucky
step too, because Erlang has experienced impressive growth
because if it.

0 new messages