This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scwm docstrings change


On Sun, 5 Dec 1999 mstachow@alum.mit.edu wrote:

> "Greg J. Badros" wrote:

> > Yes, it's possible.  But it's worse:  the name foo_proc is duplicated
> > creating yet another point of mismatch that the C language (via cpp)
> > *can* avoid.
> 
> I don't think typing the name of the function twice is bad, especially
> since it is being used in two orthogonal capacities - once to declare
> the function, and once to register it as a Scheme procedure. I also
> do not think there will be a lot of errors resulting from this
> duplication.

I haven't memorized the SCWM_PROC calling sequence yet, so I always do 
a copy & paste when defining a new primitive.  I've made mistakes
keeping the related information in sync a few times already, so I
prefer the combined version that doesn't add any more  duplication.
Unless its too painful, I'll definitely try to keep using that style in
anything I write from scratch.

I seem to remember finding SCWM_PROC immediately recognizable as both a
nontrivial CPP macro and a function definition when I first saw it in the
code.    A pointer in the top-level README or HACKING file to a brief
explanation of the macros and doc-extractor should avoid most
misunderstaning and frustration by first-time source code readers.

Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]