Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.object
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!uunet!in1.uu.net!mole-end!mat
From: mat@mole-end.matawan.nj.us
Subject: Re: C++ Productivity
Message-ID: <1995Feb10.141412.3530@mole-end.matawan.nj.us>
Organization: :
References: <1995Jan23.193745.7044@boole.com> <3hdugu$l2q@calvin.st-and.ac.uk>
Date: Fri, 10 Feb 1995 14:14:12 GMT
Lines: 38
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:112209 comp.lang.smalltalk:20722 comp.object:26560

In article <3hdugu$l2q@calvin.st-and.ac.uk>, ajry@st-andrews.ac.uk (Alistair James Robert Young) writes:
> In article <1995Feb6.132028@di.epfl.ch>,
> Robb Nebbe <Robb.Nebbe@di.epfl.ch> wrote:
> >In article <1995Feb4.210947.718@mole-end.matawan.nj.us>, mat@mole-end.matawan.nj.us writes:

[ it would be less confusing if you were to drop the attribution when you
  drop the contribution ; mat@mole-end didn't write what follows; Robb.nebbe
  did. ]

> >Unfortunately C++ templates don't define an contract with the client
> >that uses them. This means that you have no way of knowing when any
> >change you make is going to break existing code or not. Furthermore,
> >the last time I checked the semantics were ambiguous.

> >From a software engineering point of view C++ templates are rather
> >sloppy.
> 
> IMO, from a software user's point of view, C++ templates are a thing of
> nightmares. We already hear complaints every day about the ever-increasing
> size of .EXE files for applications; now along comes C++ with its convenient
> way of generating dozens of chunks of code identical in *everything* but the
> type that they handle! The reduction in code size I achieved by replacing
> a B-Tree template for eight types with a class for a B-tree of (void *)
> and derived classes to for each type was quite amazing.
> 
> Don't mistake me, I like most of C++, but for their effect on code size I
> nominate templates the Code Construct from Hell of 1995.

Actually, they are the Challenge-to-compiler-writers of the decade.

I can think of several good ways to teach a compiler how to fold the damn
things, but each of them stresses linker technology even further than
basic templates do.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile
 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
	(Training and consulting in C, C++, UNIX, etc.)
