Python from Wise Guy's Viewpoint

Joachim Durchholz joachim.durchholz at web.de
Thu Oct 23 21:36:15 EDT 2003


Pascal Costanza wrote:

> Matthias Blume wrote:
> 
>> Pascal Costanza <costanza at web.de> writes:
>>
>>
>>>> There are also programs which I cannot express at all in a purely
>>>> dynamically typed language.  (By "program" I mean not only the 
>>>> executable
>>>> code itself but also the things that I know about this code.)
>>>> Those are the programs which are protected against certain bad things
>>>> from happening without having to do dynamic tests to that effect
>>>> themselves.
>>>
>>> This is a circular argument. You are already suggesting the solution
>>> in your problem description.
>>
>> Is it?  Am I?  Is it too much to ask to know that the invariants that
>> my code relies on will, in fact, hold when it gets to execute?
> 
> Yes, because the need might arise to change the invariants at runtime, 
> and you might not want to stop the program and restart it in order just 
> to change it.

Then it's not an invariant.
Or the invariant is something like "foo implies invariant_1 and not foo 
implies invariant_2", where "foo" is the condition that changes over the 
lifetime of the object.

Invariants are, by definition, the properties of an object that will 
always hold.


Or are you talking about system evolution and maintenance?
That would be an entirely new aspect in the discussion, and you should 
properly forewarn us so that we know for sure what you're talking about.


Regards,
Jo





More information about the Python-list mailing list