I think there would be almost unanimous agreement with what you say
(even from the authors of MTL -- and, dare I speak for them, the
authors of Blitz and STL). I think everyone would admit that the
template system in C++ is used in quite unnatural and unexpected ways
in generic libraries.
Two remarks.
1. The first efforts in generic programming were exploratory, similar,
perhaps, to the efforts heroic explorers make discovering a new world.
These efforts have to me made in order to decide whether it is worth
going there -- but, it is not necessarily the case that everyone would
have to go there in the same difficult way. Once a few intrepid souls
can demonstrate that the prize is worthy of pursuit, then other
industrious souls can devise ways for the masses to achieve the
prize. Which is all a long way of saying: there are groups (including
ours) working on better approaches to generic programming.
2. Even in C++, using a generic library is much less difficult than
writing one. Many of the mystical uses of C++ are under the covers.
Admittedly, this isn't helpful for people who might want to write a
new generic library, but presumably, once a library is written, the
intended audience of users should not be overly confused by the
template magic.
Best Wishes,
Andrew Lumsdaine
In our last exciting episode nbecker@fred.net wrote:
> In my opinion we have a serious problem with c++. It is now possible
> to write, for example, a generic matrix package such as MTL. The
> problem is, writing and comprehending this arcane code requires skill
> far beyond even most highly experienced c++ programmers level. It is
> not just that the level is advanced, in the sense of some linear
> progression. It is that the methods needed are absolutely
> nonintuitive. No FORTRAN program ever did anything asked for such
> twisted logic as the magic incantations of MTL's meta-programming.
> Generic programming is clearly a prize worthy of pursuit. As it
> currently stands, C++ does not support it. I say that because in it's
> current form, only the few mystic priests can write such code.
> What we really need is direct support for generic programming with a
> language that is truly capable of representing the concepts in an
> intuitive manner.
> Anyone else have any thoughts?
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org
This archive was generated by hypermail 2b29 : Mon Apr 10 2000 - 12:47:56 EST