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?


mstachow@alum.mit.edu writes:

> "Greg J. Badros" wrote:
> > 
> > > "This is a docstring that I wrote "
> > > "just for the sake of example."
> > 
> > Don't legacy C compilers have problems with this (even more so than \n\
> > separators)?
> 
> Only pre-ANSI compilers might have trouble with this, and that
> doesn't really concern me.

But those compilers might not have trouble with \n\, so unless there's a 
really compelling reason to make it harder for them, why do so?

> > > I don't think that's too much of a pain to deal with.
> > 
> > For humans it's still a pain, too, and probably no better than just
> > newline separators for portability.
> 
> For me at least it's easier to type a quote than \n\, and more legible
> too.  Both methods are equally ANSI-compliant.

It is certainly easy to modify my script to make it do this instead, but 
if we want the newlines in the string we still need to type '\n'.  (But
I agree that we might not want newlines in the string, except maybe
after the first line that should be a purpose statement.)

Greg

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