From: Jeremy Henty Date: 2003-04-13T17:53:30+09:00 Subject: Re: Does dynamic typing make it easier to place an object in a container? In article <20030412090853.2e9b2c68.rpav@nwlink.com>, Ryan Pavlik wrote: > On Sat, 12 Apr 2003 16:55:00 +0900 > "Chad Fowler" wrote: > > >> >> I think you've taken Dave's argument too literally and missed the point. >> > > > Remember, what we're talking about here is definitions. No, what Dave's article is talking about is the practicalities of programming in Java. He is a *pragmatic* programmer, remember? > Dave is basically saying "look, you can do this with static typing, > too, so it's not static." No, what Dave is saying is that Java is *in* *practice* not staticly typed because it fails to deliver the supposed advantages of static typing. (One of) the advertised benefits of static typing is that you catch type errors at compile time. If I stick an integer into a collection and try to retrieve a string, that is (by any reasonable definition) a type error on my part. But Java won't catch that error until run-time. I know (and I am sure Dave does too) that the Java *code* I wrote to do that was actually type-correct, but who cares? From a pragmatic point of view, Java did not catch my type error until run-time, so for all the practical good it does me it is as untyped as makes no difference. Regards, Jeremy Henty