Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM (Jim Adcock) Newsgroups: comp.lang.c++ Subject: Re: Abstract vs. Template classes Message-ID: <6590308@hplsla.HP.COM> Date: 19 Oct 89 17:09:23 GMT References: <21000004@inmet> Organization: HP Lake Stevens, WA Lines: 10 Hm, I always thought the "whole" idea of the C++ approach, and templates in particular, was to avoid the additional gratuitous indirections present in other OOPLs, thus retaining C-like speed. In which case "template" needs to be a macro-like implementation, with little capabilities for machine-code reuse. I would think one could "fake" genericity via "gratuitous-indirection" relatively trivially by coercing the type of pointer used in derived classes. And in fact using pointers may be a reasonable approach if what being pointed to is large. To get reasonable performance if what is pointed to is small, you need to use templates to avoid the indirection completely.