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

Re: CVS update: subversion/subversion/libsvn_subr svn_string.c

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-10-14 04:42:17 CEST

Branko =?iso-8859-2?Q?=C8ibej?= <brane@xbc.nu> writes:
> At the very least I'd like to make everyone stop and think before
> writing
> a cast by putting a
>
> #define SVN_CAST(TYPE) (TYPE)

I'd rather minimize casts but do them the regular C way when we do
them at all. A macro draws attention (it's only a cast, after all)
and makes the code less approachable for casual readers.

If there are places in the code that have casts and don't need them,
then definitely agree we should get rid of them. If you're sure one
doesn't belong, take it out and see if someone complains. :-)

I think after this discussion, people will only put casts in when they
have a specific reason to. And if people put in spurious casts, Old
Hundred Eyes (my new name for the mailing list) will quickly notice
and ask what for.

(The main casting I see going on is when we cast all those (void *)
batons and userData arguments back to their rightful types at the top
of parser and editor callback functions. Those casts are fairly
numerous, and as far as I understand, they are necessary too.)

> P.S.: This is my last message for about a week, as I'll be totally
> out of things until the 21st. Which is good, I won't have to
> answer all the flames this'll generate. :-)

Sounds like a vacation, or at least a vacation from computers. Have
fun!

-K
Received on Sat Oct 21 14:36:11 2006

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.