From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA29427 for caml-redistribution@pauillac.inria.fr; Mon, 10 Apr 2000 01:34:02 +0200 (MET DST) Resent-Message-Id: <200004092334.BAA29427@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 HAA01913 for ; Fri, 7 Apr 2000 07:26:39 +0200 (MET DST) Received: from motgate.mot.com (motgate.mot.com [129.188.136.100]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id HAA04704 for ; Fri, 7 Apr 2000 07:26:38 +0200 (MET DST) Received: [from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (motgate 2.1) with ESMTP id WAA07137; Thu, 6 Apr 2000 22:26:35 -0700 (MST)] Received: [from fraser.asc.corp.mot.com (fraser.asc.corp.mot.com [217.1.104.8]) by mothost.mot.com (MOT-mothost 2.0) with ESMTP id WAA01512; Thu, 6 Apr 2000 22:26:29 -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 OAA19333; Fri, 7 Apr 2000 14:56:21 +0930 (CST) Sender: dchen@asc.corp.mot.com Message-ID: <38ED71B6.30118608@motorola.com> Date: Fri, 07 Apr 2000 14:57:18 +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: Jean-Christophe Filliatre CC: "caml-list@inria.fr" Subject: Re: When functional languages can be accepted by industry? References: <38E7F364.5D24BB7C@motorola.com> <14572.49274.910966.673172@cylinder.csl.sri.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Mon, 10 Apr 2000 01:34:02 +0200 Resent-To: caml-redistribution@pauillac.inria.fr Jean-Christophe Filliatre wrote: > - Recursive data-types. I didn't follow your arguments about C++ STL > versus lists in functional programming. Of course, lists are almost > always bad data-structures. But a good functional programmer does > not use lists as data-structures (a Lisp programmer, may be :-) but > rather balanced trees, Patricia trees, binomial heaps, hash-tables, > etc. Moreover, most of these datatypes are persistent, an essential > property is several applications (whether in-place destructive > datastructures require explicit copies, which are time and space > consuming). You should read Chris Okasaki's book "Purely Functional > Data Structures". I have not found a method to implement a set with an efficient element removal operation. To my knowledge, the implementation of set based on balanced tree is efficient for union, difference etc, but does not seem to be reasonably efficient for deleting an element. Besides, the tree-based implementation of set requires that the elements have an ordered type, it is not clear to me how to extend these techniques to build a set of unordered elements, say, set of sets. -- 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