RE: OONSTD: to early for standards? ï|¥ÿÿÿÿ

Geoffrey Furnish (furnish@acl.lanl.gov)
Tue, 1 Jul 1997 12:59:29 -0600 (MDT)

Barry Smith writes:
> *I'd also like to suggest that while object-oriented design using C++ as
> *an exemplar is fine, the strategy of implementation ought to be
> *applicable to other important standards, too. I'm thinking of Ada95,
> *both because of its importance in itself and because there are
> *significant communities of users who, for better or worse, need to
> *solve numerical problems there. I am also sceptical that the target
> *language -- as long as it supports an OO style -- matters a lot. We've
> *seen, for instance, a variety of codes implementing the algorithms in
> *NUMERICAL RECIPES for instance and these seemed to work fine.
>
> Absolutely, language does not matter (we do everything in C) what
> matters is the use of the basic concepts of object-oriented design
> (or even beyond that, if it is of practical value).

For variety, let me say that I emphatically disagree. One of the
central impediments to algorithm reusability in numerical libraries
that have gone before, is rigid assumptions about data layout and
types of arguments. Reusing Numerical Recipes routines is a perfect
example of how insanely difficult it is to reuse numerical libraries.
The last time I need an NR routine, I found that it took wildly
different arguments than what I had, had wildly different assumptions
about both layout and indexing, than what I had, and ultimately I was
forced to recode the whole thing by hand. This is precisely what you
should NOT have to do to use a "standard library" component.

I submit that the right way to write "standard" numerical components
int C++ is the same way the C++ standards committee has chosen to
implement "standard" data structures components. These are
emphatically /not/ easily useable from C. They in fact cannot be used
at all in C, nor should they be.

In my opinion, any meaningful "standard" for object oriented numerics
in C++, will have to be built around container-free interfaces,
implemented via C++'s support for genericity (aka "templates"). I see
little hope for reusing C++ template libraries in languages other than
C++. Other languages which support genericity, could probably
implement similar libraries using the same techniques, but it should
be understood clearly that genericity is orthogonal to "object
oriented". The STL algorithms library, is templated, but not object
oriented in any meaninful way. These properties will need to be true
of standard numerical libraries as well.

I have an article under construction which describes how to do this
sort of thing in C++. I would be happy to make it available to this
list once it has achieved techreport status.

-- 
Geoffrey Furnish                email: furnish@lanl.gov
LANL CIC-19 POOMA/RadTran       phone: 505-665-4529     fax: 505-665-7880

"Here are your ball-peen hammers. Now go malleate some heads!" -Jim Morel