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: Mark Fredrickson
Subject: Re: [Chicken-users] Re: A few questions
Date: Thu, 31 Jan 2008 10:45:21 -0600


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


I assume you mean extending (declare (exports ....)) to something like
(declare
  (exports
((square ((required int) (docstring "Returns the square of it's input"))))))

I think this is an excellent suggestion. The only thing we really need to document in this way is the public interface of units. Code comments should suffice for private functions (and some sort of (define-with-docinfo ....) type form could be made available for cases where you really need to comment something, or are testing in the interpreter, but I think that's a separate issue).

Compiling with -X docinfo could add all of this to a unit.db file which could be optionally loaded, so we could eliminate overhead for cases where you don't need the info. Perhaps (use-with-info xyz) to load?

I recently saw a talk on Factor, which has some nice documentation features built into the standard REPL. Click on a symbol to get documentation. Certainly not necessary for development, but a similar system for chicken would probably require some sort of db of symbols and docstrings.

I promise to go look at the (declare ...) system and help on this endeavor, if committers think it is a worth while idea.

Cheers,
-Mark








reply via email to

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