My first thought was just : "could some information that is currently placed
in the docstring be more useful is written differently, while still
complying with the DRY principle (that is, the parts that are extracted from
the current docstring should still be available in a useful form to the
clients of your function/macro".

The evident think that can be very easily formalized in the docstrings is
some sort of type restriction on the arguments.

A generalization of this, though, is indeed what Eiffel offers as Design By
Contract. Something like that is already present (I guess) as validators on
refs, atoms and agents.

-- 
Laurent

2009/2/26 Mark H. <mark.hoem...@gmail.com>

>
> On Feb 26, 5:55 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> > While not checking types at compile time, it seems to me that a lot of
> > clojure code still needs in the docstring some sort of "preconditions
> > warnings".
>
> Do you mean something like "Contract Programming," as in e.g., the
> Eiffel programming language?
>
> mfh
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to