On Monday, November 22, 2004, at 10:12  PM, Trey Harris wrote:

Considering the fact that other blocks may exist (sanity/rollback/etc.), perhaps a missing C<ensure> should be treated specially so it fails before C<using> and succeeds after.

That sounds reasonable -- if nothing else, it'd let you temporarily comment out an ensure block for debugging purposes.


And if you're soliciting feature suggestions, what do you think of allowing multiple instances of any type of block -- just push them all into an array and call them all with the same semantics. This would let me break up a long ensure block into several separate steps.

I'm a little bit like Larry in that I think naming is terribly important and much more often get stuck on finding the right name than on finding the right semantics.

Yup, naming is hard work.

(Personally, I think I would have leaned towards using noun names for the blocks; instead of "using", the main block might be called "action", and instead of "presuming" you could use "assert" for preconditions and "verify" for postconditions... But I'm not sure that'd be any real improvement.)

-Simon


_______________________________________________ sw-design mailing list [EMAIL PROTECTED] http://metaperl.com/cgi-bin/mailman/listinfo/sw-design

Reply via email to