guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iff?


From: Rob Browning
Subject: Re: iff?
Date: 24 Apr 2001 22:59:59 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Marius Vollmer <address@hidden> writes:

> If this is too tricky, what about having a special form `doc' that
> applies to the current body (via special recognition in
> scm_m_expand_body).
> 
>     (define (foo)
>       (doc
>         :short "Foo around."
>         "Foo around a little.")
>       ...)

Clear designations like this seem good to me, though don't you have a
problem with a function that calls a sub-function named doc?

  (define (doc x) ...)

  (define (foo)
    (doc "Is this a doc string or not?"))

An alternative would be to embed notation in the strings, or use a
separate setter to add the docs to a function (note that I'm not too
fond of the wrap-around strings I've seen in some documentation
systems so I wonder if it would be better or worse to allow lists of
strings that are flowed at display time):

  (define (foo)
    "<summary>This is the short doc string.</summary>"
    "<main>This is a long string that would have to be wrapped around, "
     "especially if this function is already too close to the right "
     "margin.  I also wonder if the filling/flowing should happen at "
     "documentation display time.</main>")

Ignore the sgml-ish tags if you don't like them, we could use
something else if this approrach was actually considered reasonable.
Also, with the right tags, we could do some fairly interesting things
automatically.

Alternately, using a setter.

  (define (foo) ...)
  (set-documentation!
   foo
   ...)

Maybe all this is just too much complexity, though...

Actually, what I'd *really* like is an easy way to have fill-paragraph
work properly on the doc strings :>

-- 
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930



reply via email to

[Prev in Thread] Current Thread [Next in Thread]