This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [SetupXP] The two styles for handling activation refusal

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...


GPG key available at: <>.

Attachment: signature.asc
Description: This is a digitally signed message part

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]