Who's minister of propaganda this week?
Alex Martelli
aleaxit at yahoo.com
Wed Mar 14 18:14:42 EST 2001
"Darren New" <dnew at san.rr.com> wrote in message
news:3AAFBA5D.63AAF897 at san.rr.com...
> Alex Martelli wrote:
> > So, all the compile-time checking is buying is catching (a small
> > subset of) the errors that would be caught in testing anyway, a
> > little bit earlier (thus, a little bit cheaper)
>
> Actually, if you do the XP thing, you write the tests before the code, so
> you're actually catching the type error before you even have something
that
> compiles. ;-)
No, because you catch the error when you *run* the tests, not
when you *write* them. So, the error is indeed caught a bit
later than if the compiler did it -- could be a fraction of a microsecond,
which makes it irrelevant, or half an hour or more, from the time
you're writing the code to when you're testing it -- and it _is_ a
little bit cheaper to fix an error a minute after you've made it,
than half an hour later, since the context is marginally fresher
in your mind; I think the overall impact on coding productivity
can well come up to several percent points -- say 5%, ballpark.
5% is not 0% (in certain fields, a 5% competitive advantage is
easily large enough to make or break a firm), but it surely is no
panacea. So, the _cost_ of moving checks ahead as much as
possible had better be kept very low.
Alex
More information about the Python-list
mailing list