[SetupXP] The two styles for handling activation refusal
Robert Collins
rbcollins@cygwin.com
Sun Jul 20 22:29:00 GMT 2003
On Mon, 2003-07-21 at 06:44, Max Bowsher wrote:
> Gary R. Van Sickle wrote:
> >On <unknown>, Max Bowsher wrote:
> >> I would very much prefer changing OnActivate to return bool, combining
> the
> >> purpose of both functions. Yes, this does require changes in all derived
> >> classes, but the changes are trivial, and the end result is a cleaner,
> more
> >> logical API.
> >
> > That was exactly my originally-submitted patch. It was refused.
>
> IIRC, it was refused because it had a load of other changes mixed into it,
> NOT because of the methodology used.
As my other two emails probably make clear, it was refused because of
design, not the patch size and multiple content. My beef with the single
large patch was and is: it's harder to discuss the fine points, like
this API change, when there are many things in the diff.
And for reinforcement, changing OnActivates return type doesn't give a
cleaner API. It increases the opportunity for misunderstanding.
A handy rule of thumb:
If you want to change something, use a void return type.
If you want to ask something, use a non-void query method.
non-void, non-query's should be the exception.
OnActivate is expected to change things...
Rob
--
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030720/c8fdf41f/attachment.sig>
More information about the Cygwin-apps
mailing list