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
This archive was generated by hypermail 2b29 : Mon Apr 10 2000 - 01:37:19 MET DST