You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Reser <be...@reser.org> on 2004/04/02 01:16:59 UTC

Re: [PATCH] Optionally use deltas in dumpfiles

On Sun, Mar 28, 2004 at 01:34:50PM -0500, Greg Hudson wrote:
> On Sun, 2004-03-28 at 13:31, Garrett Rooney wrote:
> > Since this adds a second boolean flag to this function, would it make 
> > sense to switch it to an integer with several bit flags so we can add 
> > further such options in the future without changing the prototype?
> 
> That might not be a bad idea, but it feels a little out of character
> relative to the rest of the API.  Do other people have opinions?
> 
> (This is where it would be really nice to have a language with named
> optional function parameters.)

We had discussed this on IRC in the past.  Several people (though I
don't remember who all) thought it was a good idea.  I think it's a good
idea.  The intention was to take and start making boolean's into bit
flags on new APIs and when we get around to 2.0 replace existing boolean
API's with bit flag APIs.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Optionally use deltas in dumpfiles

Posted by Ben Reser <be...@reser.org>.
On Thu, Apr 01, 2004 at 08:37:00PM -0500, Garrett Rooney wrote:
> Actually, if the values for the bitfield are named well, I think it can 
> be more readable, as opposed to remembering that the third boolean 
> argument to the function represents one thing, and the fourth something 
> else...

It certainly would be more readable in the perl bindings.  Right now I
have a bunch of function calls like this:
$ctx->status(getcwd(), 'WORKING', sub { status_func($ctx, @_) }, 1, 0,
0, 0);

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Optionally use deltas in dumpfiles

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Apr 1, 2004, at 8:32 PM, Ben Reser wrote:

>>   * It makes all of the APIs which take boolean flags (including the
>> majority which we'll never extend) more heavyweight, in terms of the
>> verbiage necessary to describe and use them.
>
> True.  Bitfields are more difficult to use.  It's a tradeoff and 
> depends
> on if you think the benefits are worth the cost.

Actually, if the values for the bitfield are named well, I think it can 
be more readable, as opposed to remembering that the third boolean 
argument to the function represents one thing, and the fourth something 
else...

It all depends on how you look at it I suppose.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Optionally use deltas in dumpfiles

Posted by Ben Reser <be...@reser.org>.
On Thu, Apr 01, 2004 at 08:26:14PM -0500, Greg Hudson wrote:
> I guess I'm not terribly sanguine about this idea because:
> 
>   * Boolean flags are only one type of argument, so this only allows one
> type of compatible extension, covering maybe 25% of API extensions (just
> kind of estimating based on the number of extensions we've made so far).

Yes and no.  It would help us avoid spewing about new functions.  If we
could simply add a bit flag for some new behavior it would save us from
adding a lot of extraneous functions.

A lot of times we're adding changes that change the way a function
behaves where it would be nice to be able to do that without adding a
function or changing the functions signature.

>   * It makes all of the APIs which take boolean flags (including the
> majority which we'll never extend) more heavyweight, in terms of the
> verbiage necessary to describe and use them.

True.  Bitfields are more difficult to use.  It's a tradeoff and depends
on if you think the benefits are worth the cost.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Optionally use deltas in dumpfiles

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2004-04-01 at 20:16, Ben Reser wrote:
> We had discussed this on IRC in the past.  Several people (though I
> don't remember who all) thought it was a good idea.  I think it's a good
> idea.  The intention was to take and start making boolean's into bit
> flags on new APIs and when we get around to 2.0 replace existing boolean
> API's with bit flag APIs.

I guess I'm not terribly sanguine about this idea because:

  * Boolean flags are only one type of argument, so this only allows one
type of compatible extension, covering maybe 25% of API extensions (just
kind of estimating based on the number of extensions we've made so far).

  * It makes all of the APIs which take boolean flags (including the
majority which we'll never extend) more heavyweight, in terms of the
verbiage necessary to describe and use them.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org