|
|
Re: Programming with "Duh" Typing
|
Posted: Jul 31, 2007 6:30 AM
|
|
> If you've paid attention, the primary arguments, at least > as posed by myself and James Watson, have been centered > around how static typing saves time by: > (1) Catching typos > (2) Automating Refactoring > (3) Increasing code clarity
And my replies to those arguments are:
(1) it's irrelevant because type errors in a dynamic system will be caught by the tests
(2) nothing that a good search & replace function can not do
(3) not really, especially in languages where lots of interfaces are involved (so you always see the interface, but not the implementation).
> > If I mispell a function name in a dynamic language, I have > to wait until something causes that codepath to be > executed before I find that error. Yes, eventually it > will be found. But it can take a long time to do it.
It seems to me that not all people run their code 100% all the time. If that is the case, then certainly, you are correct.
> > Also, you have to remember that a lot of programming may > go into a piece of software during system concept > development before it becomes millions of lines of Ada. > > So let's say a systems engineer thinks he has a brilliant > new nueral network architecture to use to distinguish > troop transports from school buses. Long term the NN may > be in software, an FPGA, an ASIC, or even some hybrid > approach. But for now the engineer wants to figure out if > it will actually work, so he codes it up in his favorite > language and sets it to work on training data. > > A day and a half later the thing bombs out because in a > rarely executed branch he typed inptu_vector instead of > input_vector. > > That's not exactly fun...
So you mean the code that bombs out was not tested?
oh, the horror! :-)
|
|