[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_error.h

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-07-13 17:35:25 CEST

Jim Blandy <jimb@savonarola.red-bean.com> writes:
> I think I'd actually prefer not to use any macro at all. I think
>
> if (error) return svn_quick_wrap_error (error);
>
> is pretty clear.

In such cases, I actually do prefer a macro, here's why:

The above is clear code, but you have to read it. It does not have
any distinctive visual pattern that says to the programmer "What's
going on here is the usual thing, which you have seen scores of times
before, so move along."

The formatting you give above is not how it would always appear.
Depending on the indentation level, a newline might have to be added
somewhere; depending on the context, braces might be needed. So it
can't always be recognized quickly.

But if it were an all-caps macro, then whenever you *did* see a
written-out conditional, you'd know it to be a conditional you should
probably care about, one having something to do with the logic of the
code.
Received on Sat Oct 21 14:36:05 2006

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