comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <john.perry@usm.edu>
Subject: Re: Why .ads as well as .adb?
Date: Mon, 3 Jun 2019 06:37:43 -0700 (PDT)
Date: 2019-06-03T06:37:43-07:00	[thread overview]
Message-ID: <12ffe476-35a7-4442-994e-9a03972619bc@googlegroups.com> (raw)
In-Reply-To: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com>

Thanks to everyone for the replies. Personally, I find three of them especially compelling:

   "As a teacher, I keep fighting with students who jump to writing bodies too early."

[I know exactly what this is like.]

   "teams can work separated from each other as needed, without the project having to distribute all of the implementation to everyone"

[Having separate specification files against which one can *compile* would be useful, not just convenient, though I think it's arguable that one can do this in Oberon, too, via .smb files and documentation.]

   "convenience"

[not a direct quote, but several people point to this, and until I read their explanations I thought the convenience ran in the other direction]

Originally I had intended no further reply, since I was just curious for information / opinions; I don't mean this as a criticism of Ada. That said, when reflecting on some of the subsequent discussion, I began to wonder if people misunderstood what I asked, or if I have misunderstood what they're saying. So I hope people don't mind if I follow up.

I'll preface the reply by quoting myself a moment:

> With Oberon, Wirth moved away from definition files, using a symbol to indicate which module identifiers should be exported.

I don't have the citation handy, but I recall reading that Wirth's stated motivation for doing this was his realization that definition modules can be generated from an implementation module, something that both Oberon and several other languages have done since then. All a language needs for this are keywords and/or markup in comments. Every Oberon compiler I've used can generate at least a machine-readable symbol file (.smb), and many that I've used provide tools that generate a human-readable HTML file. One can compile against a symbol file without having the object code. And of course Java, Eiffel, etc. offer tools to generate specifications and/or documentation from a source file.

So I was surprised that some people made absolute negations of the possibility along these lines:

    "You can't generate specification from implementation."

I especially wonder this since one of them had just referred to gnatchop, whose online documentation provides an example that does precisely that [1]. So, when I read statements like the ones above, I wonder (a) if people understand that I don't mean Ada-as-is, but a hypothetically modified Ada (I am not proposing such a modification Ada; again, it's just curiosity); and (b) if I misunderstand what people mean by "specification".

If (a) is true, then I think there is no need to continue the discussion along those lines; if (b) is true, I'd appreciate someone clarifying what they mean by "specification", since one can generate [2] from the OBNC compiler, and that seems to me to be a specification that can be, for instance, published, shared among teams, etc., even if the actual implementation is not complete.

If I'm still not being clear, please don't hesitate to point out where I'm vague, or misusing terms. Sorry if that's the case.

[1] http://sandbox.mc.edu/~bennet/ada/gnat_ug/gnat_ug_8.html#SEC78

[2] https://miasap.se/obnc/obncdoc/basic/In.def.html

  parent reply	other threads:[~2019-06-03 13: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
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 [this message]
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