[Gllug] C++ Templates, Opinions?

Bruce Richardson itsbruce at uklinux.net
Fri Dec 17 13:49:34 UTC 2004


On Fri, Dec 17, 2004 at 12:56:25PM +0000, Matthew wrote:
> On Fri, 2004-12-17 at 11:35 +0000, Bruce Richardson wrote:
> > OTOH, templates are overused by former C-coders who don't really
> > undestand OO and think it's all just a clever preprocessor hack.
> 
> Out of interest, and perhaps a bit of handy clarification, how would you
> go about correcting a C coder so mistaken?

I wouldn't try.  OO programming I do have (I think) a good grasp of in
general, across several languages, but my C++ experience is not nearly
extensive enough.

Someone more experienced than myself would probably need a twin track
approach.  On the one hand, they could demonstrate the areas where
templates excel and score over C (e.g. allowing you to code generic
algorithms which can then be bound to specific data types as needed, or
allowing better compiler optimisation).
That would probably not be too difficult.

The second track, however, would be harder.  Persuading coders who are
new to OO of the advantages of the approach is hard enough, IME, but
it's especially hard with some C coders.

-- 
Bruce

Nostalgia isn't what it used to be.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20041217/da1c3a8b/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list