From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA03803 for caml-redistribution@pauillac.inria.fr; Thu, 6 Apr 2000 15:03:56 +0200 (MET DST) Resent-Message-Id: <200004061303.PAA03803@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA18640 for ; Mon, 3 Apr 2000 03:26:14 +0200 (MET DST) Received: from motgate2.mot.com (motgate2.mot.com [136.182.1.10]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id DAA18246 for ; Mon, 3 Apr 2000 03:26:13 +0200 (MET DST) Received: [from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate2.mot.com (motgate2 2.1) with ESMTP id SAA00718 for ; Sun, 2 Apr 2000 18:26:12 -0700 (MST)] Received: [from fraser.asc.corp.mot.com (fraser.asc.corp.mot.com [217.1.104.8]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id SAA28945 for ; Sun, 2 Apr 2000 18:26:10 -0700 (MST)] Received: from motorola.com (jaguar [217.1.104.76]) by fraser.asc.corp.mot.com (8.8.7/8.8.7) with ESMTP id KAA13959 for ; Mon, 3 Apr 2000 10:56:07 +0930 (CST) Sender: dchen@asc.corp.mot.com Message-ID: <38E7F364.5D24BB7C@motorola.com> Date: Mon, 03 Apr 2000 10:57:00 +0930 From: "Dennis (Gang) Chen" Organization: Motorola Australia Software Centre X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 5.5.1 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: "caml-list@inria.fr" Subject: When functional languages can be accepted by industry? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 6 Apr 2000 15:03:56 +0200 Resent-To: caml-redistribution@pauillac.inria.fr 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