Class Browsers vs Static Types (Re: Inefficiency of __getattr__)

Mark Carroll carroll at cis.ohio-state.edu
Wed Oct 4 14:24:59 EDT 2000


In article <B600ED43.1041A%graham73 at telocity.com>,
graham  <graham73 at telocity.com> wrote:
(snip)
>Err, that's the point of a type system. If you have a piece of code
>that does
>
>    true + 1
>
>it will cause a run-time problem of some sort, unless the code isn't
>run. But the latter case is not very common, since no-one writes code
>that they don't intend to run.
(snip)

Unless you have a very well designed test suite, for any significant
project it's likely that not every line of code will actually be
executed during development and testing. Indeed, some of the code I'm
writing now has modules with features that aren't used by the
functions that use the modules, but I'm expecting that some later
version will use those features and it's easier to include them now
rather than trying to add them on later. In particular, with languages
like Lisp, without lots of (declare ...)'s I'd sometimes find type
errors cropping up some time after the code had been put into use.

-- Mark



More information about the Python-list mailing list