From: Chris Gehlker Date: 2002-03-10T00:45:05+09:00 Subject: Re: Interesting link on static/dynamic typing... On 3/8/02 10:13 PM, "Frank Mitchell" wrote: > 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. I never did understand the type system in Java. The point of having a type system, so I had always understood, was to help programmers avoid dangerous practices by isolating the very low level assemblerish stuff and flagging it with typecasts. Good programs didn't cast except in exceptional situations and the reason for the cast should always be commented, or so I always thought. Where is the 'safety' in type safety once programmers get in the habit of casting routinely? But Java makes the C-style cast a necessary and integral part of every non-trivial program. -- Every society honors its live conformists and its dead troublemakers. -Mignon McLaughlin, author