OON: c++ deficient

From: karmesin@turbolabs.com
Date: Fri Apr 07 2000 - 11:26:08 EST


nbecker@fred.net writes:

> 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.

Well, I think you'd be amazed at what goes on in some FORTRAN codes
:-).

Seriously though, there is an important distinction to make here.
When doing this nasty template stuff in C++ you're doing something
that is not just difficult in FORTRAN, it is something that is
IMPOSSIBLE. You just can't go there. In F77 you just can't build
array syntax.

These generic libraries are doing things that previously had to be
inside the compiler. And while they are arcane and difficult, they
are actually easier to do and far easier to redistribute than
modifying the compiler.

Generic programming is solving a different problem than you try to do
in FORTRAN, C, Java, etc. It is basically a way to extend the
compiler. With that point of view, C++ templates are crufty as hell.
But they can be made to work, and they point the way to very
interesting new lines of work.

-Steve Karmesin

--------------------- 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