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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,9124c8b7efcea462 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!kanaga.switch.ch!switch.ch!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 24 Feb 2010 14:05:53 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada and Doxygen References: <4b84fb09$0$6579$9b4e6d93@newsspool3.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Message-ID: <4b852431$0$6578$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 24 Feb 2010 14:05:53 CET NNTP-Posting-Host: f63f2408.newsspool3.arcor-online.net X-Trace: DXC=E6C\i>CWDmlTRbh@=IMcF=Q^Z^V3H4Fo<]lROoRA8kFWRE0Pj]@nc\616M64>JLh>_cHTX3jM5QZJ7\1bWcH X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:9303 Date: 2010-02-24T14:05:53+01:00 List-Id: Hibou57 (Yannick Duch�ne) schrieb: > Le Wed, 24 Feb 2010 11:10:16 +0100, Georg Bauhaus > a �crit: >> Not being a designer, I still think there already >> is something serving as an even better solution >> (in terms of real-world usability). >> >> Using facilities of AI05-0183, >> >> >> procedure Pop (Cap : Bottle_of_Beer) >> with Brief => "produces the sound of opening a bottle", >> Pre'Class => not Is_Open (Bottle); > We all wait for that, but it is not there, and anyway, it's source and > source will never have the expected properties of a document (like > publication, browsing). Two remarks. 1) Ada "aspects" and solutions similar to NaturalDocs (which looks a bit like a mix of Java comments and Python comments) need not be mutually exclusive. With aspects, however, the Ada grammer will guide the compiler, the comipler will mark errors, and, importantly, do so without too much comment syntax awareness : If there is an identifier in a "comment aspect" and this identifier is not visible where the subprogram is declared (of which the comment is an aspect), then the compiler proper will diagnose this error. | procedure Pop (Cap : Bottle_of_Beer) | with Brief => "produces the sound of opening `Bottle`", | Pre'Class => not Is_Open (Bottle); $ future.ada.compiler example.ada (C) The Hot Air Dptmt. 20XX example.ada:14:60: Identifier "Bottle" is not known here example.ada:15:45: Identifier "Bottle" is not known here Therefore I think there is a way to, finally, force us programmers to keep comments and code in sync and have the compiler tell us if we don't! 2) The first example of NaturalDocs is telling, I'd say. Effectively, is shows two syntaxes for declaring subprograms: - one that is explaining what is going on, what the parameters are etc. and - the other, which needs the first syntax in addition because it features the typical {}-languages' obfuscating syntax for declaring things... Can we do better?