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: docstrings in Guile!


"Greg J. Badros" <gjb@cs.washington.edu> writes:

> Michael Livshin <mlivshin@bigfoot.com> writes:
> > I somehow don't feel comfortable with 'guile-doc-snarf', for instance.
> > I mean, it's a misleading name, I first got it to mean "snarf the
> > docstrings".  but it snarfs everything, so perhaps 'guile-snarf'
> > really is better, even if it's old and boring ;).
> 
> Yep; it's a better name but was already taken.  I'm anticipating
> blasting guile-snarf later

hmmm...  isn't it backwards-compatible?

> > but the above are, of course, tiny nitpicks.  great work, thanks.
> > it's psychological impact is probably pretty big, too.
> 
> That's what we've gotta bet on... at least to me the code is infinitely
> more readable given the simplified argument validation.  Also it's a lot 
> less intimidating to work on the documentation when the code is right
> there and you know the documentation makes a difference immediately.

yeah, it's a big win.  the '#define FOO_PROC/#undef FOO_PROC' things
do stick out, but it's no big deal if they can be tool-checked.

> One remaining annoyance that I did not yet fix... lots of this pattern:
> 
> SCM_NIMP(x) && SCM_FOOP(x)
> 
> I don't think that there is that big of a performance win by not having
> the SCM_FOOP's check SCM_NIMP (there are some places where the SCM_NIMP
> is factored out into an earlier test that affects several branches).
> 
> I think we should fold the SCM_NIMP macro test into SCM_FOOP macro
> definitions, and add a new SCM_F_FOOP (for *F*ast foop) or
> SCM_SLOPPY_FOOP for the cases where we really want that test omitted.
> Then things work right away (perhaps with a non-noticeable performance
> degradation), and where performance *really* counts (based on profiling) 
> we can switch to SCM_SLOPPY_FOOP.  Elsewhere we just eliminate the
> SCM_NIMP eyesore.
> 
> Comments (before I just go run with this idea!)?

I like it, but then I currently have a headache ;).  and SLOPPY is a
better infix, IMHO, because using such macros alone should be
discouraged.

> Greg

--mike

-- 
newsgroup volume is a measure of discontent.                 -- Erik Naggum

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