Hildo Biersma writes: > Hold on - post conditions are not intended to veto a change, they're > intended to terminate the program if an assertion is invalid. Hence it > should not matter if they run before or after assignment. > > Given that the assertion should be "now this and that should be true", > and you may want to call validation methods as part of that assetion, > the implementation of the checks becomes vastly easier if they are > applied to the new state of the object, instead of the old state and a > set of proposed changes. So it sounds like Damian's lvalue subs + postconditions won't give me what I want. How do I do what I want? Have an lvalue sub but prevent the value from being changed to something invalid? Do I need a combination of lvalue subs and tied variables? Augh. Nat
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameter... Hildo Biersma
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Buddha Buck
- Merge RFC's 107 and 118 (was Re: RFC 118 (v1) l... Nathan Wiger
- Re: RFC 118 (v1) lvalue subs: parameters, explicit assig... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Johan Vromans
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Buddha Buck
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Nathan Wiger
- Re: RFC 118 (v1) lvalue subs: parameters, expli... David L. Nicol
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Damian Conway