chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: A few questions


From: Elf
Subject: Re: [Chicken-users] Re: A few questions
Date: Thu, 31 Jan 2008 08:27:01 -0800 (PST)


we could just define a special form (define-with-docstring <name|lambda list> <list|string> body...)
which would just be syntactic sugar for a define and a procedure-data.
this of course leaves variables and macros undefined.

we could also change how define itself works and try to make it smart about
such things, but this would almost certainly be a bad idea.

a third possibility is similar to whats in place already... have explicitly
named elements of an associated proplist with each var/func, optionally.

-elf

On Tue, 29 Jan 2008, John Cowan wrote:

Hans Nowak scripsit:

Re docstrings: My next question would be, is it possible to add them (e.g.
as a library)?  And would it be desirable to do so?  Apparently it is
already possible to write code like:

(define (foo x)
  "docstring for foo"
  ...body...)

Yes, but that will not work for non-function definitions; furthermore,
(define (f x) "foobar") is ambiguous: is "foobar" a docstring, or
the constant result of the function f?






reply via email to

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