r1390443: Switch ra_svn to templated commands
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 2 Apr 2013 23:17:01 +0100 (BST)
Hi Stefan.
In <svn.apache.org/r1390443>, you wrote:
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?
For reference, r1390443 looks like this in svn_ra_svn.h:
/** Write a command over the network, using the same format string notation
+/** Write a command of type @a cmd over the network connection @a conn.
and the change to each call site looks like this:
- Julian
-- Join WANdisco's free daily demo sessions on Scaling Subversion for the Enterprise <http://www.wandisco.com/training/webinars>Received on 2013-04-03 00:17:35 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.