comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <john.perry@usm.edu>
Subject: Re: Why .ads as well as .adb?
Date: Sun, 9 Jun 2019 15:37:26 -0700 (PDT)
Date: 2019-06-09T15:37:26-07:00	[thread overview]
Message-ID: <ebc186da-bb82-41eb-9d3e-a6e43c85ea31@googlegroups.com> (raw)
In-Reply-To: <gm5b7mFfj1bU1@mid.individual.net>

Hi Niklas

Let me preface my reply by saying that I think we mostly agree.

On Sunday, June 9, 2019 at 4:15:37 PM UTC-5, Niklas Holsti wrote:
> > I don't even know where to find Ada.Text_IO on my
> > system.
> 
> Your IDE (GPS) knows. And its not hard to find, either, once you figure 
> out its file-name (with gnatkr).

Sure, but such an IDE has to be Ada-ready, and in any case turns one of the arguments I was complaining about on its head: you have to use a special tool for it, and in this case you really *do* have to use the special tool every time you want to look something up. The Eiffel documentation I pointed to, like the ADA RM, doesn't require anything more than a web browser.

You refer to GPS. GPS does not come with FSF gnat, at least not on my Linux distribution (Fedora), not as far as I know. For the first couple of years I toyed with Ada, that's what I had. Also, I never heard of gnatkr before reading this, and it doesn't seem to have a man file on any of my systems. I do however appreciate learning this!

[Now that I'm getting more serious, I've downloaded the CE edition & AdaCore has been really nice with some help (I'm an academic), so I should probably acknowledge that.]

> AIUI it was generated, but not from an Ada spec (.ads) file.

I would like to know how that was generated. I figured the spec was the easiest way to do it. A lot of the documentation in the RM is really thorough -- a bit intimidating in its thoroughness, in fact.

> > Some have suggested that the markup required to do this can make the
> > source file unreadable.
> 
> The markup makes the file less readable, IMO. No markup is really 
> required for getting nice views and cross-links -- it is enough to 
> follow some simple conventions for locating descriptions (comments) 
> close to the declarations they describe.

I agree with the second part, but since all the markup I've seen for Doxygen and javadoc appear in comments, I don't really understand the first. It's an opinion, so I can't really complain, but I do wish to express my dissent. :-)

> > Moreover, there's no need to invoke such a tool every time you want
> > to see the specification, and thus no inconvenience at all.
> 
> While a program is being built, the specs of that program's specific 
> packages change often, unlike the spec of standard packages like Text_IO.

Fair enough, but a lot of the conversation previously had revolved around different teams in different locations, and my impression from the conversation was that those specs were fairly stable. That was the context I had in mind, but I agree with what you say, if only from painful experience.

> Typically [Doxygen-generated spec] is as useless as the "User Manuals" for GUIs that just show screen-shots of various dialogs and explain things like "to frobnicate the lesneric, press the <Frobnicate the Lesneric> button -- without any coherent description of "frobnication" or "lesnerics". 

Of course. I think I deleted from my earlier message a brief rant on how I once tried to figure out an Android service and ended up fighting (1) terribly written documentation, (2) non-working sample code, and (3) a Google developer's Google+ help page that featured soft porn (I swear I am not making any of this up). In the end I had spent 8 hours trying to figure out why my code wouldn't work, simple because Google's documentation told you to use version X, while the sample code used version Y, and for whatever reason I actually had to use version Z. (The fact that the sample code didn't work was actually part of what clued me in to the problem.)

So I am absolutely nodding as I read what you're saying there. But, that's more a problem with the writer of the documentation, the culture of the software development outfit, etc. We're supposed to be talking about a language and/or documentation issue.

If you want to argue that Ada's approach to separating spec and implementation forces the programmer to write better documentation than you'd get from Doxygen, javadoc, etc., you're welcome to make that argument. Some people have hinted in that direction, but I haven't seen anything really convincing. I think it much more likely that if Ada's users are generally more careful with documentation, then that has a lot to do with their target applications: if an Android app crashes, who cares? but if a Boeing falls out of the sky, that's a problem.

As far as I can tell, this has nothing at all to do with having two files versus having one file, and that's my point. So we seem to be in agreement, since as you point out:

> But of course this can  be automated -- it is IMO _not_ the main problem with Doxygen-type documentation, and this is anyway not relevant to the subject of this thread: why Ada separates specifications from implementations.

Right. My quarrel, which is really more of an irritation, is with those whose arguments suggest they think it's impossible to generate specification / documentation from an implementation file, and that seems to keep coming up, so I just wanted to put a quick word in about it. That's all. It has no bearing at all with the great answers provided by others, and for which I'm grateful.


  reply	other threads:[~2019-06-09 22:37 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02  0:48 Why .ads as well as .adb? John Perry
2019-06-02  5:42 ` J-P. Rosen
2019-06-02  6:39 ` Dmitry A. Kazakov
2019-06-03  7:35   ` Maciej Sobczak
2019-06-03  7:57     ` J-P. Rosen
2019-06-03 19:49       ` Keith Thompson
2019-06-04  8:03       ` Maciej Sobczak
2019-06-03  8:13     ` Dmitry A. Kazakov
2019-06-03 19:51       ` Keith Thompson
2019-06-03 20:18         ` Dmitry A. Kazakov
2019-06-04  8:24       ` Maciej Sobczak
2019-06-04  9:33         ` Dmitry A. Kazakov
2019-06-05  9:04           ` Maciej Sobczak
2019-06-05 12:48             ` Dmitry A. Kazakov
2019-06-05 17:12               ` G. B.
2019-06-05 18:50                 ` Optikos
2019-06-05 22:57                   ` Randy Brukardt
2019-06-04 22:28         ` Randy Brukardt
2019-06-05  8:28           ` Maciej Sobczak
2019-06-05  9:20             ` J-P. Rosen
2019-06-05  9:28               ` Paul Rubin
2019-06-05 10:11                 ` Niklas Holsti
2019-06-05 12:58                   ` Maciej Sobczak
2019-06-05 14:28                     ` Niklas Holsti
2019-06-06  7:34                       ` Maciej Sobczak
2019-06-06 19:51                         ` Keith Thompson
2019-06-06 20:27                           ` J-P. Rosen
2019-06-06 21:12                         ` Randy Brukardt
2019-06-06 21:17                         ` Randy Brukardt
2019-06-06 22:08                           ` Dennis Lee Bieber
2019-06-07  7:59                           ` Maciej Sobczak
2019-06-07 10:42                             ` alby.gamper
2019-06-07 16:59                               ` Dennis Lee Bieber
2019-06-07 14:10                             ` Brad Moore
2019-06-07 23:37                               ` Paul Rubin
2019-06-08  1:16                                 ` Brad Moore
2019-06-08  7:34                                   ` Simon Wright
2019-06-08 17:44                                 ` G.B.
2019-06-08 21:41                                 ` Keith Thompson
2019-06-09  0:40                                   ` Paul Rubin
2019-06-09 18:56                                     ` Keith Thompson
2019-06-09 20:35                                       ` John Perry
2019-06-09 21:15                                         ` Niklas Holsti
2019-06-09 22:37                                           ` John Perry [this message]
2019-06-10  9:01                                             ` Simon Wright
2019-06-10 13:15                                               ` Simon Wright
2019-06-10  9:22                                             ` Niklas Holsti
2019-06-09 21:37                                         ` Simon Wright
2019-06-09 22:40                                           ` John Perry
2019-06-10  9:07                                             ` Simon Wright
2019-06-09 21:46                                         ` Niklas Holsti
2019-06-10 17:11                                         ` Dennis Lee Bieber
2019-06-08  4:57                             ` Randy Brukardt
2019-06-08 23:57                               ` Optikos
2019-06-09  0:43                                 ` Paul Rubin
2019-06-10  8:17                               ` Maciej Sobczak
2019-06-10 19:10                                 ` G.B.
2019-06-10 22:07                                 ` Randy Brukardt
2019-06-11  0:32                                   ` Optikos
2019-06-11 15:39                                     ` Brad Moore
2019-06-11 16:14                                       ` John Perry
2019-06-11 16:46                                         ` Shark8
2019-06-11 19:29                                           ` John Perry
2019-06-14  6:12                                             ` Brad Moore
2019-06-14 21:51                                               ` John Perry
2019-06-14 16:29                                             ` djakoogler
2019-06-11 18:19                                         ` joakimds
2019-06-11 15:49                                   ` Jeffrey R. Carter
2019-06-07  7:36                       ` Niklas Holsti
2019-06-05 22:41                     ` Randy Brukardt
2019-06-06  3:34             ` Keith Thompson
2019-06-06  7:29               ` Maciej Sobczak
2019-06-06 15:30                 ` John Perry
2019-06-06 15:41                 ` Brad Moore
2019-06-06 19:42                 ` Keith Thompson
2019-06-06 16:37               ` Dennis Lee Bieber
2019-06-02  9:59 ` joakimds
2019-06-02 20:14 ` G.B.
2019-06-03 13:37 ` John Perry
2019-06-03 14:50   ` Niklas Holsti
2019-06-03 19:23     ` John Perry
2019-06-03 21:04       ` Niklas Holsti
2019-06-03 18:51   ` Lucretia
2019-06-03 19:32     ` John Perry
2019-06-03 17:00 ` Jeffrey R. Carter
2019-06-03 18:59   ` Lucretia
2019-06-03 19:29   ` John Perry
2019-06-03 20:00     ` Jeffrey R. Carter
replies disabled

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