[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: r1390443: Switch ra_svn to templated commands

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Wed, 3 Apr 2013 12:43:00 +0200

On Wed, Apr 3, 2013 at 12:17 AM, Julian Foad <julianfoad_at_btopenworld.com>wrote:

> Hi Stefan.
>
> In <svn.apache.org/r1390443>, you wrote:
> [[[
> Merge third batch of changes from the 10Gb branch.
> Switch ra_svn to templated commands.
>
> Revisions 1388276,1390209
> ]]]
>
> I assume the main reason for this change is to remove the run-time
> overhead of parsing a format string, and in that respect it seems fine.
>
> In terms of API style, however, it seems to me that you might as well make
> the API have a dedicated function for each RA command instead of using this
> single function with a template parameter. Then we would have the benefit
> of static checking of the number and types of the arguments. The
> implementation of this 'templated' API pretty much ends up calling a
> specific function per command anyway. I'm sure an implementation with
> dedicated functions would be shorter in source code too (and a nanosecond
> quicker as well :-).
>
> Does that sound good?
>

It does. We always had an interface comprising
of all these commands - we are simply changing
the way to express / codify it (format string ->
template / enum -> function).

-- Stefan^2.

-- 
*Join one of our free daily demo sessions on* *Scaling Subversion for the
Enterprise <http://www.wandisco.com/training/webinars>*
*
*
Received on 2013-04-03 12:43:34 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.