comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <john.perry@usm.edu>
Subject: Re: Why .ads as well as .adb?
Date: Tue, 11 Jun 2019 12:29:08 -0700 (PDT)
Date: 2019-06-11T12:29:08-07:00	[thread overview]
Message-ID: <fac481df-158b-4cab-b578-3220c9096c74@googlegroups.com> (raw)
In-Reply-To: <c8c6e1c0-4fd2-449e-b7b6-16e656dc44fd@googlegroups.com>

@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.
> 
> (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 you. I've worked for 12 years as software engineer since graduation from University 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 embedded C programming. I was first handed a pretty thorough manual on SCSI devices. When I was done with that, I was handed a stack of magazines with articles on garbage collection, the topic they wanted me to work on. That's my experience of industry.

My experience of academia is actually worse than industry. When writing code 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 wrong answer. In one particular case, the code had been written 30 years prior, 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 has its benefits).

So I definitely understand your argument here. On the other hand, what's the challenge in typing this?

   javadoc nbody.java

Unless you're handed the source code *on* *paper*, which I find a little hard to believe, that produces a specification of public and protected classes, methods, fields, etc. How is that different from the spec that Brad described?

> (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 applications using javadocs, and that includes eating from my own kitchen. I'm open to the idea that most programmers could write better documentation (I even stated as much above), and definitely that I should write better documentation, 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 documentation, 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 lot of its seeming annoyances fix bugs that I've actually experienced, before they cause the program to crash. (I can think of 3 examples off the top of my head where using Ada would have saved me & C++ did not.) It is my intent 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.


  reply	other threads:[~2019-06-11 19:29 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 [this message]
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