in reply to Re: Static typing is mostly a waste of time
in thread Static typing is mostly a waste of time
Furthermore, as others have pointed out, the fact that I can cast anyway I want to get by the compiler means the compiler won't really catch serious bugs. It's like the compiler is saying: if you claim you really know what you're doing, I'll let you; but if you don't, I'll try to help by asking you to type a little more.List list = getList(); // from somewhere, say a list of Person Iterator it = list.iterator(); while(it.hasNext()){ // the following line makes perfect sense to me, // but it causes a compiler error, I'm supposed to write: // Person p = (Person)it.next(); // my question: Is the compiler helping me or I'm helping the com +piler? Person p = it.next(); // now call some method on p. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Static typing is mostly a waste of time
by Mabooka-Mabooka (Sexton) on Apr 17, 2005 at 23:58 UTC |