[Types-sig] doc strings (was: Sorry!)
Greg Stein
gstein@lyra.org
Thu, 16 Dec 1999 13:55:54 -0800 (PST)
On Thu, 16 Dec 1999, Edward Welbourne wrote:
>...
> (I'd even be happy with the typedecl incorporating the docstring, which
> is part of the interface spec after all: and would make the run-time
> thing actually called be lighter-weight in some probably-irrelevant
> sense.) Actually, there are two doc-strings in two places: one is the
> doc-string of (say) the function object - it says what the function does
> - the other is where some object carrying that function documents the
> role of the attribute as which it stores that object. This is directly
I agree with the doc string thing. Specifically, imagine something like
this:
----------
# module foo
decl some_global: String
"some_global is used for ..."
decl some_func: def(Int) -> None
"this function does ..."
----------
Note that JimF's interface proposal allows attaching doc strings to the
elements of an interface. I believe the "decl" statement and associated
doc strings would be the (syntactical) subtitution for his runtime
solution.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/