On 2013-06-25, rusi <rustompm...@gmail.com> wrote: > On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote: >> In my experience the sorts of people who preach "one exit point" are >> also all about defining preconditions and postconditions and proving >> that the postconditions follow from the preconditions. I think that >> the two are linked, because the "one exit point" rule makes those >> sorts of proofs simpler. > > Ah! utopia! > > For every one who knows about pre/post/invariant conditions, > there are 10 who follow goto-statement-is-harmful like a > religious edict.
The one-exit-point rule is helpful for tracking entry and exit invariants. But in my view it shouldn't be followed when it makes code worse. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list