quote:Original post by Jim_Ross
Javanerd''s explanation of templates, although he states that they are not templates, sounds very much like they are similar to templates. Interfaces are agreements that all subclasses shall obey a certain standard, like a template for a class. It seems like making an Object interface, then subclassing it with the types that you need and typecasting should solve all your template problems.
On a side note, I don''t see why one would "need the ''functionality''" of dynamically typed data.
Hmm? Templates are not templates eventhough they are templates? Well, I got your point though.
Templates are not like interfaces. Templates contain the IMPLEMENTATION of the class, but just leave the handled datatype to be specified at compile time.
Dynamically typed data? Templates are compile time, statically typed things. That would be handy in Java.