Re: Proposal: Ref Counting Conventions



> This is a long post with fragments of the argument clipped together.  Here
> is a summary of my position:
> 
> 1. It seems that people agree about conventions (1) and (3).  Should we
> adopt them?
> 
> 2. Convention (2) deals with inout parameters.  I maintain that convention
> (2) correctly distinguishes inout's from "in's" and "out's" and that it
> allows callers to have consistent behaviour and not have to do anything
> weird when dealing with such parameters.  My argument continues below
> 
> 3. I'd also agree that "inout" parameters are confusing and often
> unnecessary.  Usage of "inout" parameters should be avoided if reasonable.
> However, since "inout" exists in CORBA, we should have a convention for
> dealing with it.  Actually, the fact that it is rarely used makes my
> visual auditing argument below even more poignent.
> 
> 4. As far as I know, nobody has a silver bullet for tracking down refcount
> issues.  I certainly never saw one in the COM world.  The best defense
> against refcount bugs is clear, consistent rules so that source code can
> be visually audited to see if it follows those rules.

I agree on all counts.  The inout problem turned out to be a rather
nasty nest.

Basically, lets just discourage people from using "inout" on
Bonobo::Unknown objects.

Miguel.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]