From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3334f982144a667d X-Google-Attributes: gid103376,public From: "Norman H. Cohen" Subject: Re: javadoc => adadoc? Date: 1998/08/03 Message-ID: <6q4k5q$10uo$1@mdnews.btv.ibm.com>#1/1 X-Deja-AN: 377502508 References: <6ptlbe$k3$1@nnrp1.dejanews.com> <6pvslq$poo@drn.newsguy.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: IBM Microelectronics Division Newsgroups: comp.lang.ada Date: 1998-08-03T00:00:00+00:00 List-Id: nabbasi@earthlink.net wrote in message <6pvslq$poo@drn.newsguy.com>... >it seems to me that the need for adadoc is much less than for java. > >in java, there is no separation between the specification and implementation >of the package, so one uses the tool javadoc to 'pull out' the specifications >into an html nicly formatted output so one can look it and know what the API >is. > >in Ada, one can simply look at the speification part of the package, no tool >is needed to 'pull out' the API out of the body as is the case with java. While Java does not REQUIRE the separation between specification and implementation, it certainly ALLOWS it: A Java programmer can define an interface and a class implementing that interface, achieving roughly the same effect as writing a package spec and package body in Ada, and this is a common Java practice. (Unlike Ada, Java does not enforce hiding of the implementation: Another part of the program can access the implementation by casting from the interface type to the implementation type.) Thus javadoc was not invented to make up for a supposed inability to separate implementation and interface. The true benefit of javadoc is the automated generation of hypertext documentation that can be viewed with a browser. Indices by package, by class, and by method name, as well as links to related pages (e.g. from the declaration of a parameter of type FileFilter in the listFiles method of class File to the documentation for the FileFilter interface) are generated automatically. Tree diagrams showing the ancestors of a class are generated automatically. In JDK 1.2, javadoc also generates lists of descendents, and lists methods that a class inherits from each of its ancestors. This isn't rocket science, but it's damned convenient in large software projects. Any language, particularly an OO language, can benefit from this kind of tool. -- Norman Cohen