> > Well this is one of those things that is ignored when > > people claim that dynamic languages are faster to > develop > > in. The testing burden is a bit higher (even if people > > don't want to admit it) and the documentation burden is > > much greater. Once you take these things into account, > > I'm not sure that it's true that it's much faster. If > you > > don't do these, then it seems like you are really > speeding > > along but in the long term you pay for it. For things > > that are small enough to fit in ones brain all at once, > I > > think the benefits of a dynamic language like Python > far > > outweigh the costs. > > The testing burden in dynamically typed languages is not > greater than the testing burden of statically typed > languages, provided that you do functional testing for all > your requirements. Actually, the testing burden is equal > in both cases.
I disagree. There are no perfect tests. I can make changes in a static language that require no testing. I know they will not break anything and they do not. With a static language testing is required mainly at the end of a unit of work. With dynamic languages, testing is required pretty much after every trivial change. Otherwise, it's easy to become hopelessly lost.
Functional testing is required for any application but I am not talking about that. I'm talking about testing just to capture typing errors or anything else that a static language will tell you you have done wrong. If you are waiting until functional testing to verify that you haven't fat-fingered anything, then perhaps we have different ideas about functional testing.
> The documentation burden is also equal in both cases. Even > with static typing, types do not tell us anything about > how the variables are used, so they have to be > documented.
The types have to be documented. But I don't need documentation to know what the expected types of a given methods arguments are.
> Personally I document every variable and member > attribute/method of my classes either in Java or C++. It > feels incomplete if I do not do that.
But in a dynamic language you should be documenting every variable in addition to the above.