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: Documentation procedure


>>>>> "Keith" == Keith Wright <kwright@tiac.net> writes:

Keith> I know this little kludglet (write the docstring as though
Keith> it were the first expression in the procedure body) has a
Keith> long history in the Lisp world, but I have to suggest that
Keith> there would be several advantages to adding the docstrings
Keith> in a more straightforward way.

I selected this simply because guile already recoqnizes the form:

guile> (define (foo) "this is a test" 123)
guile> foo
#<procedure foo ()>
guile> (procedure-properties foo)
((arity 0 0 #f) (name . foo))
guile> (procedure-documentation foo)
"this is a test"

But I agree that there are cleaner ways to express this (however I see
no compelling reason not to maintain the old way).


---------------------------+--------------------------------------------------
Christian Lynbech          | Ericsson Telebit A/S                       
Fax:   +45 8628 8186       | Fabrikvej 11, DK-8260 Viby J
Phone: +45 8628 8177 + 28  | email: chl@tbit.dk --- URL: http://www.tbit.dk
---------------------------+--------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)


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