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: Guile docstrings---should Guile code be ANSI C compatible?


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> (Again I'm forced to bring things up which could be interpreted as
>  implicit criticism of Greg's work: Let me just repeat that I like
>  his work a lot, and think it is important.)

Don't sweat it; I can take criticism -- just keep saying how great it is 
along with the comments for improvement, and I'll remain happy! :-)

> Guile's current docstrings are not compatible with ANSI C.
> 
> "In ANSI C, string literals are not allowed to continue past newlines
> like this, but this is how Guile's docstrings look like now."
> 
> "ANSI C requires that newlines are included explicitly\n\
> like that."
> 
> (The last \ just says that the two lines should be interpreted as one
> line.)
> 
> Until now we have followed the rule that Guile code should be ANSI C
> compatible.  Since the code in the current repository isn't compatible
> with regard to docstrings, it can't be compiled on all ANSI C
> compilers.

But it's got other constructs like "long long" that are not ANSI C (turn 
on -pedantic to find them).

> 
> We now have two alternatives:
> 
> 1. (Greg's suggestion) Making an exception to the rule about ANSI C
>    compliance and using a script which transforms the code in the
>    .x-files into ANSI compilant source using a script:

Let me stress that this suggestion is for the short term-- I don't think 
we should *release* guile-1.3.6 w/ this script, but only that while the
docstrings are in a state of flux, it might be prudent to ask those
using stricter ANSI compilers to use the script and keep the code in the 
repo non-strict until the docstrings stabilize.

Alternatively, some good Emacs tools for managing the docstrings \n\
terminators (e.g., reformatting a docstring, adding the \n\ lines, etc.)
might be really useful.

<snip>

> Maciej, could you please make a decision which route we should take.

Again, I think it'd be insane to not have the docstrings properly
terminated by release time, but my script shows that we can get there
pretty easily whenever we want to, and I think it wiser to fall on the
side of convenience to developers in the short term.  Anyone using guile 
from CVS better be competent enough to apply the script to make a more
ANSI-like version to compile on a stricter compiler.

I'd feel a little differently if there are lots of folks contributing
who do their main dev work on systems w/ the stricter rules (since
committing for them will be annoying; maybe then we'd need a script to
undo the \n\ terminators, too), but I don't have any evidence to believe 
that that's the case.

Thanks,
Greg


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