From: Andrey Semashev (andysem_at_[hidden])
Date: 2005-09-20 23:07:06
Rob Stewart wrote:
> From: "Andrey Semashev" <andysem_at_[hidden]>
> I've not looked at anything else, but I thought I'd address
>> - The naming of arm/disarm methods of scope guard. They are used to
>> change the activity status of the guard. Personally, I feel fine
>> with them but the commonly used name for disabling the guard is
>> "dismiss" and I just can't figure out its suitable counterpart in
>> English. I wonder if anyone have a proposal about this.
> "Dismiss" would be the right word in English to tell the guard to
> go away and do nothing more.
Yes but what about its antipod - a function to enable the guard? Note that
the guard may even be initially disabled (that's another reason I didn't
like dismiss) and then it may be enabled in some place.
>> - The naming of the function make_guarded_call (in previous version
>> it was make_transaction) is what I'm not sure of. This function in
>> addition to a scope_guard creation calls some another functor. The
>> semantic is grouping the "do" and "undo" actions in the user code.
>> Does anyone have a better name?
> How about "call_guarded" or "invoke_guarded?"
That might do. But doesn't the common make_ prefix mean that something (a
guard in this case) should be created?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk