Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!netcomsv!jls From: jls@netcom.COM (Jim Showalter) Newsgroups: comp.object Subject: Re: Readability of Ada Message-ID: <1991May9.040947.28053@netcom.COM> Date: 9 May 91 04:09:47 GMT References: <1991May1.041007.14124@odi.com> Sender: netnews@netcom.COM (USENET Administration) Distribution: comp Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 55 Originator: jls@netcom.netcom.com ]> >The only ]> >measure of readability should be how the program text conveys its ]> >purpose to a person reasonably fluent in the language. ]> Strongly disagree, and you may have struck the heart of the ]> argument. It is pointless to test readability of language by ]> asking people who already CAN read the language (your "reasonably ]> fluent" programmers) to judge readability. ]>I see. Then let's give your Ada program to someone who has never ]>programmed a computer in any language at all, and ask for an ]>interpretation. I think the relevant question to ask is: given two pieces of code that are functionally-equivalent (they both compute Julian dates, for example), one written in C, the other written in Ada, both written for maximum readability by equally expert programmers, how much training does someone need in order to understand the C version, and how does this contrast with the amount of training required to understand the Ada version? I argue that less training is required to achieve comprehension in Ada, and that this is an inherent advantage of Ada over C. Presuming this claim is true, Ada's lower training-to-comprehension overhead translates into lowered maintenance costs, since a person doesn't have to be a rocket scientist to fiddle with the code. ]>Not fair? OK, let's find someone who has only ever programmed in ]>assembly language. Or someone who has only ever programmed in APL. ]>Do you think that it will be intuitively obvious which keywords ]>indicate iteration? Is knowledge of Ada syntax something that human ]>being are born with? Well, this is certainly a fair question, and I had to think about it for a while to decide what my response is. I guess the answer is that, yes, I DO believe that the keywords that indicate iteration are intuitively obvious, and that Ada syntax IS something relatively natural for humans. After all, one of the goals of the Ada language designers was to make it regular, readable, intelligible, easy to learn, etc. To the degree that they succeeded, I would expect it to feel fairly natural to human beings. I've certainly been running on the assumption that Ada is readable. Is it not? Is it gibberish to the uninitiated? Is there an assembly language or APL programmer out there who truly doesn't know anything about Ada who would care to comment on whether the following code snippets make any sense?: for Current_Day in Monday..Friday loop Go_To_Work; end loop; while Batter_Remains_In_Bowl and People_Are_Still_Hungry loop Make_More_Pancakes; end loop; if You_Are_Sleepy then Go_To_Sleep; end if;