When functional languages can be accepted by industry?

From: Dennis (Gang) Chen (Dennis.G.Chen@motorola.com)
Date: Mon Apr 03 2000 - 03:27:00 MET DST

  • Next message: Christophe Raffalli: "Re: backward compatibility"

    Hi,

    Functional languages have not been very successful in industry. Why?

    When writing database applications, we use Access, Oracle and languages
    which support interfeaces to these database systems.

    When writing an application which needs user friendly interface, one can use Delphi,
    or Java, Visual Basic, Visual C++, C++ Builder etc.

    When writing text manipulation programs, perl is a good choice.

    For internet application, one use Java, perl, Deplhi, Visual C++ etc.

    When higher order functions are required, we can use any OO language, because
    an object with one method can be viewed as a function, so if a function can accept
    objects as inputs and output an object, then this function is a higher order function.

    To write polymorphic functions, one can use templates in C++.

    For data structures which require dynamic memory allocation, one can consider
    Standard Template Library (STL) in C++. From STL, you can choose list, set,
    map, tree templates, which are sufficient for most purposes.

    The templates in STL are more efficient than list in functinal languages. For example,
    if you use list to implement set, then a deletion of an element from a set will require
    reconstruction of a part of the list, which has significant memory cost. In STL
    templates, this is a simple pointer operation.

    To write a parser, I prefer to use ocaml as I'm aware of its adavantage
    in this aspect. But I've learnt that there are other compiler tools available.

    Functional languages in ML family are equiped with a much better type system
    than C++, this reduce errors in programs, but industry has its own procedure to
    ensure the reliability of program. So the weakness in C++ does not bother too
    much.

    Module in ocaml is an attractive feature. Large applications are built in a refinement
    way,
    and different implementations for a given interface will be experimented. Module
    should be good for this, and it is not available in C++.

    The size of functional language program is usually small, this feature probably would give
    a chance
    for functinal language to enter industry. A program stored in a smart card or in a mobile
    phone
    can not be a big one.

    Are there other features of functional language which will attract industry?

    --
    Dennis Gang CHEN    Senior Software Engineer
    Motorola Australia Software Centre, Electronic Design Automation
    2 Second Avenue, Mawson Lakes, SA 5095, Australia
    phone: +61 8 8203 3560,  mailto: Dennis.G.Chen@motorola.com
    



    This archive was generated by hypermail 2b29 : Thu Apr 06 2000 - 15:11:25 MET DST