Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme style auto-resizing hashtable (fwd)
Chris.Bitmead@misys.com.au writes:
> >In any case, Henry Baker has a nice paper about how mapping is where
> >it's at & how iterators are just a weak add-in to a broken language.
>
> Can I download this paper from somewhere?
>
> I was going to disagree, but then I thought I should read the arguments
> first.
Ok. I found it for you:
Iterators: Signs of Weakness in Object-Oriented Languages
ftp://ftp.netcom.com/pub/hb/hbaker/Iterator.html
ftp://ftp.netcom.com/pub/hb/hbaker/Iterator.ps.Z
Here's the abstract:
The appearance of iterators in an object-oriented language appears
to be inversely related to the power of the language's intrinsic
control structures. Iterator classes are used for the sole purpose
of enumerating the elements of an abstract collection class without
revealing its implementation. We find that the availability of
higher-order functions and function closures eliminates the need
for these ad hoc iterator classes, in addition to providing the
other benefits of "mostly functional programming". We examine a
purely functional iteration protocol for the difficult task of
comparing the collections of leaves on two non-isomorphic
trees--the so-called "samefringe" problem--and find that its type
signature requires recursive (cyclic) functional types. Although
higher-order "member functions" and recursive (cyclic) functional
types are unusual in object-oriented languages, they arise quite
naturally and provide a satisfying programming style.
--
Harvey J. Stein
BFM Financial Research
hjstein@bfr.co.il
Guile Home |
Main Index |
Thread Index