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:a6b:3c0a:: with SMTP id k10mr5361338iob.271.1560281348933; Tue, 11 Jun 2019 12:29:08 -0700 (PDT) X-Received: by 2002:a9d:3ee2:: with SMTP id b89mr23947983otc.342.1560281348748; Tue, 11 Jun 2019 12:29:08 -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!nntp.giganews.com!s188no2524itb.0!news-out.google.com!l135ni15itc.0!nntp.google.com!s188no2520itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 11 Jun 2019 12:29:08 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:3c3:401:f550:ed1b:1c49:c5e3:4c32; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 2601:3c3:401:f550:ed1b:1c49:c5e3:4c32 References: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> <87woi0xtwm.fsf@nightsong.com> <4a0438de-1f1d-4469-aae4-908854d378ea@googlegroups.com> <47d02bdc-6b50-43aa-bc5d-bb5b6225f5bd@googlegroups.com> <4516d350-0076-4dc7-b482-87d5693d3977@googlegroups.com> <0c9a9692-5fa2-46ba-8649-d5bddcc88a3f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Why .ads as well as .adb? From: John Perry Injection-Date: Tue, 11 Jun 2019 19:29:08 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56621 Date: 2019-06-11T12:29:08-07:00 List-Id: @Shark8, @joakim [Shark8 wrote:] > > Why would someone hand you the source code? It's more likely they would= hand you the output from javadoc, and you'd work with that. >=20 > (a) Have you ever been employed in a small / medium software shop? In my = experience its almost *always* that you "get handed the source code". [Similarly, Joakim wrote:] > John, if that's your experience from industry then I am very happy for yo= u. I've worked for 12 years as software engineer since graduation from Univ= ersity and my experience is that one simply gets handed the code with very = little explanation and/or comments/documentation. In reply to Shark8, I worked at one such shop 25 years ago. They did embedd= ed C programming. I was first handed a pretty thorough manual on SCSI devic= es. When I was done with that, I was handed a stack of magazines with artic= les on garbage collection, the topic they wanted me to work on. That's my e= xperience of industry. My experience of academia is actually worse than industry. When writing cod= e for research purposes, I've had to decipher features few to no comments, = and when I ask how something is supposed to work, I would sometimes get a w= rong answer. In one particular case, the code had been written 30 years pri= or, perhaps even in a different language before porting over to C. On that = one I eventually gave up and took a different route altogether (academia ha= s its benefits). So I definitely understand your argument here. On the other hand, what's th= e challenge in typing this? javadoc nbody.java Unless you're handed the source code *on* *paper*, which I find a little ha= rd to believe, that produces a specification of public and protected classe= s, methods, fields, etc. How is that different from the spec that Brad desc= ribed? > (b) You're assuming there is documentation, and that it is some level of = quality that makes it usable/readable. Brad's Ada example doesn't have much in the way of documentation, either. I= doubt it has much more than javadoc would produce. For instance, it doesn'= t tell me whether I need to supply a command-line argument, as I do in the = Java program (which crashes if I don't, and no, it isn't documented there, = either). Rosetta Code has lots of examples of not-particularly-highly-documented Ada= code; see, for instance, ABC Problem. > (c) Javadoc is *NOT* inherently usable/readable... We'll have to agree to disagree here. I've developed quite a few applicatio= ns using javadocs, and that includes eating from my own kitchen. I'm open t= o the idea that most programmers could write better documentation (I even s= tated as much above), and definitely that I should write better documentati= on, but the arguments advanced in this particular thread seem to be stating= that Ada's separation of spec from implementation (the original question!)= would *force* or *guarantee* that I write better comments, or get better d= ocumentation, and I just don't see that. ~~~ I apologize for dragging this on. I like Ada, and in most ways I prefer it = to every other language I've looked at. I wish I'd met it much earlier. A l= ot of its seeming annoyances fix bugs that I've actually experienced, befor= e they cause the program to crash. (I can think of 3 examples off the top o= f my head where using Ada would have saved me & C++ did not.) It is my inte= nt to use it in the future. Many answers to my question have been really helpful & illuminating; I just= don't find this particular line compelling at all. I'm sorry. I think I've= explain the difficulty I have with it, so I'll try not to repeat it again.