Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:Dynamic typing (Score 1) 517

Class cast exception can be avoided by not trying to cast objects to types that they shouldn't be cast to. Of course you can't cast an ArrayList to a BufferedStreamReader.

That's correct. But then a function/method having to check for possible parameter errors can be avoided by not passing in incorrect parameters.

The number of unit tests you have to write increases with dynamic typing. You have to write unit tests to see what happens when you pass in the wrong type.

That's incorrect. You do not have to write unit tests to see what would happen when passing in parameters of the wrong type. You have to write test to make sure the callers pass in parameters of the correct type.

Slashdot Top Deals

Congratulations! You are the one-millionth user to log into our system. If there's anything special we can do for you, anything at all, don't hesitate to ask!

Working...