This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Scwm docstrings change
- To: mstachow at alum dot mit dot edu
- Subject: Re: Scwm docstrings change
- From: Stephen Tell <tell at cs dot unc dot edu>
- Date: Tue, 7 Dec 1999 22:53:24 -0500 (EST)
- cc: "Greg J. Badros" <gjb at cs dot washington dot edu>, scwm-discuss at SCWM dot MIT dot EDU, guile at sourceware dot cygnus dot com
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