From: Frank Mitchell Date: 2002-03-09T14:13:20+09:00 Subject: Re: Interesting link on static/dynamic typing... Paul Brannan wrote: > > On Sat, Mar 09, 2002 at 01:14:00AM +0900, Chris Gehlker wrote: > > 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++? When I saw Meyers I first thought Bertrand Meyer (singular) ... and *he* would argue generic types in fact complement and preserve the type system. If you assume that static typing is a benefit not a hindrance, generics (or templates in C++) are necessary. One of the more annoying things about Java is that, whenever you put an object into a collection class you have to typecast it to get it out ... and if due to some bug the wrong type of object got in, good luck finding where. Another annoyance is having to wrap an int or float in an object to add it to a collection. > > 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? See http://www.jcp.org/jsr/detail/14.jsp -- Frank Mitchell (frankm@bayarea.net) Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html