> Yes, we can write it (and even as A = B * C; in C++, if you're into that
> sort of thing), but I think it's unclear how to make it both easy to use and
> efficient. If you want your code to look exactly like that, what does
> product(,) return? My experience is with C++, where this becomes a real
> problem. product(,) can't return strictly by value or you've just copied
> the A matrix. It can't return by reference for obvious reasons. You could
But that's a problem specific to C++; most other OO languages use
reference semantics. Which makes me wonder: is there a technical reason
why C++ is the most common OO language for numerical work, or is it
just due to the relatively easy availability of C++ compilers?
>From my personal experience, C++ is about the least convenient OO
language in existence.
-- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais -------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:05 EST