It was my impression that you were going to do something along the
lines of extend-procedure and procedure-data--the main difference
being the parser would create the docstring or "docsexpr" slot
automatically.  One could reuse the extra procedure data slot right
now for this purpose, e.g.

(define square
 (extend-procedure
  (lambda (x) (* x x))
  '(doc (p "Squares argument " (code "x") "."))))

#;7> (square 5)
25
#;9> (procedure-data square)
(doc (p "Squares argument " (code "x") "."))

and you can obviously macro this, so I figured it was a simple matter
of adding a doc slot, accessor and modifying the parser for define in
some basically R5RS-compatible way.  Then you do whatever you want
with the data.

I think what Felix was asking was for a general syntax for doc-sexprs
that was compatible with R5RS and that doesn't confuse people or put
them off. After all, the obvious syntax for docstrings is readable,
and will just be ignored by R5RS.

I like the idea, anyway.  Build a good, unobtrusive version and people
will find a use for it.


On 12/15/06, felix winkelmann <[EMAIL PROTECTED]> wrote:
On 12/15/06, Peter Bex <[EMAIL PROTECTED]> wrote:
>
> I suppose we just have to agree to disagree on this issue.  Maybe a user
> poll about what approach to take is in order?

Why can't everybody just use the approach he/she prefers? When asking
about the "docsexpr" thingy on this list, I was just trying to figure out what
users generally think of it. I will add some sort of generalized approach
to add "annotations" based on a quoted list/docstring to chicken, what
people make from that is their own choice.


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to