- changed status to resolved
promise::finalize_anonymous(): rename, remove or rewrite
As currently defined, promise::finalize_anonymous()
is semantically identical in every way to promise::fulfill_anonymous(1)
. However, the reader has to visually diff the paragraph of semantics describing each to discover this equivalence. There's also a design question of why we feel the need to have two different names for semantically equivalent methods (especially since they are close enough to breed confusion).
I see three possible resolutions:
-
Rename
promise::finalize_anonymous()
topromise::fulfill_anonymous(void)
, ie make it a zero-argument overload for the method which shares its semantics. -
Remove the superfluous
promise::finalize_anonymous()
entirely, and instead add a default of 1 to thecount
value ofpromise::fulfill_anonymous(count)
. This one remaining method can then be used with or without argument to achieve all the same behavior as currently. -
If we insist on keeping the superfluous
promise::finalize_anonymous()
method as sugar, then we should change its documentation to explicitly clarify it is sugar. Ie replace the entire semantics with something like:Equivalent to
this->fulfill_anonymous(1)
Options 1 or 2 could also rename the one unified name to a new unified name if that makes sense.
Comments (1)
-
reporter - Log in to comment
Fix issue
#63: finalize_anonymous() clarificationExplicitly document promise::finalize_anonymous() as sugar for promise::fulfill_anonymous(1).
→ <<cset e97c751653a2>>