chicken-users
[Top][All Lists]
Advanced

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

Re: Re: [Chicken-users] Re: Integrating unit tests into source code


From: Zbigniew
Subject: Re: Re: [Chicken-users] Re: Integrating unit tests into source code
Date: Fri, 15 Dec 2006 19:14:59 -0600

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 <address@hidden> wrote:
On 12/15/06, Peter Bex <address@hidden> 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.




reply via email to

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