Nice TWiki > Dev > CustomConstructors (r1.25 vs. r1.26) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic CustomConstructors (r1.26 - 04 Feb 2004 - BrianSmith)
Added:
>
>

It isn't always possible. Imagine that the precondition for the constructor is "an instance with the given (x,y) coordinates does not already exist in some pool." Then the initializer will add the new instance to the pool. In this case, the invariant for the class would be "an instance with the given (x,y) coordinates does exist in some pool." But, obviously the invariant can't be both at the same time. In other words, the constructor's precondition is only required to hold before construction, but not necessarily every point in time afterwards like the invariant. -- BrianSmith - 04 Feb 2004


Topic CustomConstructors . { View | Diffs | r1.27 | > | r1.26 | > | r1.25 | More }
Revision r1.25 - 04 Feb 2004 - 03:23 GMT - DanielBonniot
Revision r1.26 - 04 Feb 2004 - 06:45 GMT - BrianSmith
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.