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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:9567:: with SMTP id y94mr16923542jah.28.1559569064514; Mon, 03 Jun 2019 06:37:44 -0700 (PDT) X-Received: by 2002:aca:5ed7:: with SMTP id s206mr951077oib.122.1559569064276; Mon, 03 Jun 2019 06:37:44 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!4no4221itm.0!news-out.google.com!l126ni17itl.0!nntp.google.com!4no4218itm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 3 Jun 2019 06:37:43 -0700 (PDT) In-Reply-To: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:3c3:401:f550:d862:6e0f:52a5:2d49; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 2601:3c3:401:f550:d862:6e0f:52a5:2d49 References: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <12ffe476-35a7-4442-994e-9a03972619bc@googlegroups.com> Subject: Re: Why .ads as well as .adb? From: John Perry Injection-Date: Mon, 03 Jun 2019 13:37:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56440 Date: 2019-06-03T06:37:43-07:00 List-Id: Thanks to everyone for the replies. Personally, I find three of them especi= ally 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 d= o this in Oberon, too, via .smb files and documentation.] "convenience" [not a direct quote, but several people point to this, and until I read the= ir explanations I thought the convenience ran in the other direction] Originally I had intended no further reply, since I was just curious for in= formation / opinions; I don't mean this as a criticism of Ada. That said, w= hen reflecting on some of the subsequent discussion, I began to wonder if p= eople misunderstood what I asked, or if I have misunderstood what they're s= aying. 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 in= dicate which module identifiers should be exported. I don't have the citation handy, but I recall reading that Wirth's stated m= otivation for doing this was his realization that definition modules can be= generated from an implementation module, something that both Oberon and se= veral other languages have done since then. All a language needs for this a= re 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 compi= le 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 possibil= ity along these lines: "You can't generate specification from implementation." I especially wonder this since one of them had just referred to gnatchop, w= hose online documentation provides an example that does precisely that [1].= So, when I read statements like the ones above, I wonder (a) if people und= erstand that I don't mean Ada-as-is, but a hypothetically modified Ada (I a= m 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 al= ong those lines; if (b) is true, I'd appreciate someone clarifying what the= y mean by "specification", since one can generate [2] from the OBNC compile= r, and that seems to me to be a specification that can be, for instance, pu= blished, 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