Type Parameters are Completely Unnecessary

Darryl psygnisfive at yahoo.com
Tue Mar 4 22:27:50 PST 2008

I would argue that type parameters for collection
classes are completely unnecessary. Supposing some
collection class Set with a method add, it would be
trivial to subclass it to TypedSet. Simply have an
argument in the constructor called contentType, and
redefine add to force type checking of all items being
added, filtering out anything not matching. I don't
see why it's necessary to clutter up the syntax with
ugly Set.<int> like notation when existing
functionality can handle this sort of type constraints
with ease and elegance.


Be seeing you...

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

More information about the Es4-discuss mailing list