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

"force" option in APIs

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-03-23 13:50:13 CET

The "force" option (in general) is a UI hack for a human user to get around
some particular temporary problem. It temporarily disables a whole bunch of
checks and restrictions. It's a bit like the option that some programs provide
to "Answer Yes to any question the program might ask", which is absolutely
horrible. It's a bit like turning off your firewall because it's blocking
something that you want to receive. It can quickly get the user out of a
difficult situation, but the user just has to hope that it won't allow
something bad to happen because of the other checks being disabled.

The "force" option thus has no place in an API unless the API is intended to
directly implement one particular UI, which ours are not. If an API wants to
provide a way to disable the checks for validity of "svn:*" properties, then
the option should be called "disable_svn_property_checks", etc. To also allow
deletion of a nonexistent property, add another option,
"allow_delete_nonexistent_property", etc.

So, I think the "svn_wc_prop_set2" API needs to be fixed, at least in the name
of its "force" option and the doc string which is currently "If @a force is
true, do no validity checking. [...]". (That is plainly an exaggerationg: we
do expect it to do some sorts of validity checking.) It is new in 1.2 so can
be fixed in place.

Also (many?) other APIs, especially any that are new in 1.2.

?

- Julian

-- 
http://www.foad.me.uk/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 23 13:51:34 2005

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.