comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Ada and Doxygen
Date: Wed, 24 Feb 2010 14:05:53 +0100
Date: 2010-02-24T14:05:53+01:00	[thread overview]
Message-ID: <4b852431$0$6578$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <op.u8mpsskzvwnd5a@garhos>

Hibou57 (Yannick Duchï¿œne) schrieb:
> Le Wed, 24 Feb 2010 11:10:16 +0100, Georg Bauhaus
> <rm.dash-bauhaus@futureapps.de> 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?



  reply	other threads:[~2010-02-24 13:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  8:39 Ada and Doxygen Hibou57 (Yannick Duchêne)
2010-02-24 10:10 ` Georg Bauhaus
2010-02-24 11:20   ` Hibou57 (Yannick Duchêne)
2010-02-24 13:05     ` Georg Bauhaus [this message]
2010-02-25 12:18     ` Stephen Leake
2010-02-25 13:31       ` Marco
2010-02-25 15:02         ` Hibou57 (Yannick Duchêne)
2010-02-25 14:56       ` Hibou57 (Yannick Duchêne)
2010-02-26  8:49         ` Stephen Leake
2010-02-26 18:42           ` Hibou57 (Yannick Duchêne)
2010-02-27 14:00             ` Stephen Leake
2010-02-27 14:25               ` Hibou57 (Yannick Duchêne)
2010-02-26 18:43           ` Vadim Godunko
2010-02-26 19:02             ` Hibou57 (Yannick Duchêne)
2010-02-26 20:04               ` Vadim Godunko
2010-02-27  7:46                 ` sjw
2010-02-27  9:12                   ` Hibou57 (Yannick Duchêne)
2010-02-27 13:38                     ` Jacob Sparre Andersen
2010-02-27 14:23                       ` Hibou57 (Yannick Duchêne)
2010-02-27 14:25                 ` Stephen Leake
2010-03-06 13:41             ` Marco
2010-03-03 23:55           ` Randy Brukardt
2010-03-04  6:56             ` Hibou57 (Yannick Duchêne)
2010-02-25 12:12 ` Stephen Leake
2010-02-25 18:31 ` Tero Koskinen
2010-02-26 10:52 ` Gautier write-only
2010-02-26 18:50   ` Hibou57 (Yannick Duchêne)
2011-03-16 21:44 ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox