On 3/8/02 11:28 AM, "Paul Brannan" <paul / atdesk.com> wrote:

> On Sat, Mar 09, 2002 at 01:14:00AM +0900, Chris Gehlker wrote:
>> I've been dragged, kicking and screaming, to the conclusion that templates
>> are a symptom that C++ is too strongly typed in the first place. They have
>> some nasty side effects too in terms of code bloat and making programs hard
>> to debug. I'm assuming you've read Meyers's books and know how to mitigate
>> the code bloat problem but look again. Isn't he really just using templates
>> to defeat the strong typing built into the language.
> 
> Do you think the problem is with templates themselves, or could they be
> due to the immaturity of the tools available for C++?
> 
> It seems to me that debugging problems introduced by templates are due
> to buggy debuggers.  The code bloat problem is a tradeoff; it's the
> classic speed/size issue.
> 
> The biggest complaint I have with templates is compilation time; perhaps
> this would be solved by the export keyword (which Comeau should have
> soon!).

Eiffel does not suffer from code bloat or bad compile time with its
generics. Haskell, Clean, and ML, sure don't suffer either. So it isn't
generics/templates causing the trouble. Rather than speed/size tradeoff, I'm
thinking 'algorithm'.

> 
>> Last time I looked, Java had acquired some primitive generic programming
>> facilities.
> 
> Hmm, I've never heard of this.  Can you point me to some information?
> 
> Paul
>