Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!fluke!ssc-vax!dmg From: dmg@ssc-vax (David M Geary) Newsgroups: comp.object Subject: Re: Readability of Ada Message-ID: <3892@ssc-bee.ssc-vax.UUCP> Date: 23 Apr 91 16:49:36 GMT References: <3878@ssc-bee.ssc-vax.UUCP> Sender: news@ssc-vax.UUCP Reply-To: dmg@ssc-vax.UUCP (David M Geary) Organization: Boeing Aerospace & Electronics Lines: 95 > David Geary ] Jim Showalter Jim Showalter, after posting some extremely ugly C code for Julian date calculation, and a subsequent posting of easy to read Ada code for the same purpose makes the claim: ] Writing as well as possible in C, one can still not write ] programs that are as readable and understandable as programs ] written in Ada by an equally competent programmer with the same ] objectives in mind. This, of course, is ridiculous. I responded to this statement by posting my own version calculating Julian dates which I feel was just as readable as Jim's Ada code. Jim has taken it upon himself to turn this into an ugly language war where he is carrying the cross for Ada. Jim responds emotionally with: ] I take it then you've never read the C book written by one of the ] language's inventors? You know, the one with all the one and two ] character identifier names? And I take it that you've never seen ] 'i' used as the control variable on a "for" loop? I mean, really, ] I've seen ZILLIONS of one or two character identifier names. That ] the code you've read and the code I've read have been disjoint sets ] seems to defy the laws of probability. Are you sure you don't want ] to retract your above claim? "Never" is a rather strong statement. ... ] 1) It takes up considerably more room than my Ada example. Very odd, ] seeing as how a common criticism people make of Ada is that it is ] verbose. ... I used an assert() macro very much like C's assert() macro: ] 4) While it is laudable that you invented an assertion mechanism, this ] is not necessary in my example because I can use Ada's exception ] mechanism. Apparently exceptions are ALSO not an "unecessary" feature. ... I define PRIVATE to be static, and then declare functions PRIVATE: #define PRIVATE static PRIVATE BOOLEAN isLeapYear(year) ... ] 5) You have this stuff about PUBLIC and PRIVATE functions. While I find ] this confusing enough that I'm not sure I understand it, I BELIEVE what ] you are doing is inventing some sort of crude form of visibility control. Look, Jim, I am not arguing against Ada. I like Ada. I would love to be able to have many of Ada's features in C. That's great that Ada has builtin boolean types, does range checking on variables, has an exception mechanism, etc. I wish C had them. Ok? Calm down, take a deep breath... No one is attacking Ada. Repeat after me: "Everyone is *not* trying to attack Ada. Those people behind me are not C programmers trying to kill me". ;-) All I'm doing is responding to your claim: ] Writing as well as possible in C, one can still not write ] programs that are as readable and understandable as programs ] written in Ada by an equally competent programmer with the same ] objectives in mind. I maintain that my code was as easy to understand as yours. Period. I do not claim that C is superior to Ada. I do not claim that C has more features than Ada. I am not following you home at night. Ok? Lastly, Jim writes: ] ...I worked in C for years and years: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ] my opinions towards it were formed AFTER I had the facts in hand. Thus I ] am not prejudiced, merely experienced. And thus I am not a bigot. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ After statements like: ] 4) While it is laudable that you invented an assertion mechanism, this ] is not necessary in my example because I can use Ada's exception ] mechanism. Apparently exceptions are ALSO not an "unecessary" feature. ... ] 5) You have this stuff about PUBLIC and PRIVATE functions. While I find ] this confusing enough that I'm not sure I understand it, I BELIEVE what ] you are doing is inventing some sort of crude form of visibility control. Students that have taken my introductory C course understand that #define PRIVATE static PRIVATE int someFun() ... Restricts the scope of someFun() to the file it is in. Students in my introductory C course also know of C's assert() macro, and how to use it. Jim is obviously either out and out lying about his C experience, or he never learned the language well. Ignorance is often the progenitor of bigotry.