Version française
Home     About     Download     Resources     Contact us    
Browse thread
When functional languages can be accepted by industry?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@m...>
Subject: Re: When functional languages can be accepted by industry?
Jean-Christophe Filliatre wrote:
> 
> > more attractive than C++. In ocaml, there are arrays, structures
> > and objects etc, but no such things like pointers in C.
> 
> Wrong. You have references, which are quite better than pointers (they
> are typed, 

	So are C/C++ ones ..

> and necessarily initialized)

	.. which is a serious problem. And C++ also has 'necessarily
initialised' references :-)

> > 1. Current functional languages do not have enough library support:
> 
> Please. ocaml has  the most wonderful standard library  that any other
> language  has ever had.  Have a  look in  the reference  manual before
> stating such non-sense.

	Oh come on. Have a look at a real library before making
such non-sense claims. Considerable functionality is missing,
the library is inconsistent, the documentation is incomplete,
and it is less generic than C++ STL, which is also probably
more efficient on almost every operation.

	Many of us who know STL wonder how to fit it into the
ocaml type system! 
 
> > 2. Functional languages do not well support the use of dynamic
> > data structures which requires mutable operations for achieving the
> > efficiency;
> 
> Wrong. And you should stop thinking that efficiency means mutable data
> structures. Once again, read Okasaki's book.

	The statement said 'functional languages do not
well support use of dynamic data structures which _require mutable
operations for efficiency_'. you cannot say the conditional
is wrong, only the claim that functional languages do not
provide good support for mutable data structures.

	You could argue that the argument is void, since the
assumptions are vacuous 'there are no such data structures',
but reality would prove you wrong very quickly. The vast majority
of data structures are collections of interrelated objects
reflecting or controlling state, and where changes are propagated
throughout the data structures in such a way that efficient
functional modelling would be worthless -- since the application
domain is clearly one in which state transformation is the whole point.
 
> Your arguments  are not the good  ones. People in industry  do not use
> functional programming for other reasons: because this is not in their
> culture, because  they don't know,  because they have not  been taught
> functional programming. Some of  them, like you, think that functional
> programming languages are inefficient, but they are wrong.

	Show me a functional programming language that is as fast
as C++ and I will give up C++. :-)

	Until then, I will use ocaml where speed is not essential,
but power is important, and confidence in the result crucial
(such as a compiler).

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net