Best way to document definitions? 
Author Message
 Best way to document definitions?

I haven't used the module system much as I've only just started with
DrScheme, but I've started on a documentation system (see recent
posting to the PLT Scheme mailing list if interested) that I think
could make good use of the module system.

The system is designed to allow programmer documentation along the
lines Common Lisp docstrings, with a bit more structure. It will be
possible to create documentation is different formats, say HTML, XML
and on-line (apropos etc.) It seems to me that I could handle these
different output formats by changing a few symbols imported into the
documentation module. If I was writing in an object-orientated style
I would use constructer argument to achieve the same effect. eg:

myDocumentation = new Documentation(new HTMLOutput());

in everyone's unfavourite language.

Importing the symbols achieves the same effect in a fully functional
manner.

Noel



Sat, 06 Jul 2002 03:00:00 GMT  
 Best way to document definitions?
I don't know exactly what you're trying to do, but on the surface it
sounds quite reasonable.  Indeed, MLers have been using functors to
accomplish similar ends for ages.  A typical example in the ML world
is to parameterize a set of operators over some algebra, then send in
a structure that represents the algebra in the form of a new type and
operations defined for that type (a kind of ad hoc polymorphism).  By
sending in different algebras, you get different resulting systems.

Yours appears to essentially be a special case of this.  Indeed, many
examples using the multiple instantiation property can be recast in
these terms.  Note that a crucial characteristic of the definition of
both PLT Scheme units and ML functors is that they're generative.
That is to say, if you write

  (invoke-unit (unit (import) (export make-foo foo? foo-x)
    (define-struct foo (x)))

and run this code five times, you get the constructor, predicate and
selector for five *distinct* versions of the type named `foo': you
can't use foo-x<1> on make-foo<2>, for instance (where <n> means "the
value resulting from the n'th invocation").

'shriram



Sat, 06 Jul 2002 03:00:00 GMT  
 Best way to document definitions?
: I haven't used the module system much as I've only just started with
: DrScheme, but I've started on a documentation system (see recent
: posting to the PLT Scheme mailing list if interested) that I think
: could make good use of the module system.

[snip]

: Noel

This was supposed to be in response to an early question about uses of
the PLT Scheme module system [How are reusable modules used?]. I
pressed the wrong key on the newsreader.

Noel, who isn't a drooling idiot most of the time (or so he hopes)



Sat, 06 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Best way to document definitions?

2. Best Place to trap all ways out of a window

3. Which ways better??

4. best ways to flush?

5. Better ways of expressing "KIND"

6. Good ways to debug Tcl/Tk?

7. Which is the Best Practice to management Documents??

8. The best solution for printing report into MS Word document

9. Help: What's the best document imaging template

10. Simple Librarian (a better definition?) for gnat

11. Best definition for delete/3

12. Looking for a good coding standard document

 

 
Powered by phpBB® Forum Software