Python from Wise Guy's Viewpoint
costanza at web.de
Fri Oct 31 01:50:08 CET 2003
Lex Spoon wrote:
> Pascal Costanza <costanza at web.de> writes:
>>...and it requires you to go to all the places where they are defined.
>>Yes, I know the answer: "But they should be all in one place." No,
>>they shouldn't need to be all in one place. For example, I might want
>>to place test code close to the definitions that they test. Or I might
>>want to organize them according to some other criteria.
>>No, it's not hard to find them all, then. I can use grep or my IDE to
>>find them. But that's still more work than just commenting them
>>out. If I seldomly need to find all test cases, I can trade locality
>>of all test cases for some other possible advantages.
> With a good IDE, "distance" should be the same as "semantic nearness",
> if that term makes sense. In a good IDE, there already is an existing
> way to browse all the tests, or it is easy to extend the IDE to allow
> it. So things are in the "same place" whenever they have a semantic
> attribute that the tools can index on. No matter how you layout
> tests, there is sure to be a way for a decent IDE to show you all the
...an if the IDE is already that smart, why should it still require me
to comment out code just to make some other part of the program run?
A programming language environment should make programming as convenient
as possible, not in some areas convenient and in some other arbitrary
areas less convenient.
(And if you think that static type checking makes programming more
convenient, then yes, why not? Add that as an additional option! But
make it possible to switch it on or off on demand!)
More information about the Python-list