E
Ed
Thomas said:Nooooooooooooo... that way lies dynamic typing.
I must admit that I don't really know what dynamic typing is; I didn't
realise that defensive coding was protection against it.
Commercial code, apparently, averages around one defect per 20 lines.
You really want to pick up on and remove those problems.
Software can be quite complex. It's kind of handy to write down exactly
what is expected in the programming language itself.
Couldn't agree more, I just wanted to point out that I used to
defensive code more than I do now without, I think, loss of quality and
with, perhaps, some productivity increase. I certainly would never,
now, defensive code between two default accessor classes that I wrote
myself that are both some conceptual distance from the implementation
sitting behind the package's facade. But if such defensive coding does
pick up one of those defects, then defend away ...
..ed (listening to the, "Batman Begins," OST)