John Lamb wrote:
Can anyone suggest good sources of information, particularly books on the new features in Java 1.5?
I'm particularly interested in generics. For example, it seems to me, that you should can build up concepts as interfaces and specify template classes with templates that must implement particular interfaces. This would be better than C++ because I don't think you can specify that a template class must, for example, implement assignable and equality comparable, in C++. (I know Boost does this, but there is some runtime overhead.) The new java may be capable of it if you're willing to accept .equals() instead of operator=(), etc.
Yes. Boost has the concept_check stuff, but AFAIK, there is no runtime overhead at all. Also, you can guarantee the interface mixing templates and inheritance. template <class T : public myInterfaceClassName> class ... Pretty simple uh? But you rarely see people using it, because generic programming and traditional object programming seems to be some sort of competitors. []s Davi de Castro Reis