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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0d68c502c0ae6 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Printing Enum Variable Re: Linux World Date: 1999/03/08 Message-ID: <1999Mar8.075013.1@eisner>#1/1 X-Deja-AN: 452556124 X-Nntp-Posting-Host: eisner.decus.org References: <7bfc2n$jl9@dfw-ixnews5.ix.netcom.com> <7bhh26$r7c$1@remarQ.com> <36DCAC1F.430E2C5E@aasaa.ofe.org> <7bk4v8$kl8$1@remarQ.com> <36DDA761.7B4E8099@aasaa.ofe.org> <7bkrmm$ao1$1@nnrp1.dejanews.com> <36DE0007.5236CEA2@aasaa.ofe.org> <7bmmu2$n0h@news1.newsguy.com> <7btj81$j0d$1@remarQ.com> <1999Mar7.074102.1@eisner> <7bva62$kgm$1@remarQ.com> X-Trace: news.decus.org 920897419 10448 KILGALLEN [192.67.173.2] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1999-03-08T00:00:00+00:00 List-Id: In article <7bva62$kgm$1@remarQ.com>, "Michael Young" writes: > Larry Kilgallen wrote in message > news:1999Mar7.074102.1@eisner... >> While those participating in this forum may be atypical, there is >> a belief that most of those with a C++ compiler are programming in >> C. In that sense, this backward compatibility may be the greatest >> technical weakness of C++, as well as its greatest marketing strength >> (selling lots of licenses to people who don't really use the > features). > > I agree wholeheartedly that C encourages certain poor programming > practices. However, Ada is not the only solution to these problem. I > hear in your postings: "Ada is better than C; C++ supports features and > practices we recognize as evil in C; therefore, C++ is bad. OTOH, Ada > rejects all of C; therefore Ada is good." That's pretty convoluted, > don't you think? I did not mean to say (and I don't believe I ever said) that Ada was the only solution to anything. I believe the fact that C++ supports the operations of C is a weakness. I view the fact that some Ada compilers support the operations of assembly language is a weakness*. >> > While I'm not especially fond of the old SDK, its structure looks >> > surprisingly like object use in Ada today. Instead of the more > succinct >> > C++/Java style aWindow.GetDC(), we see GetDC(aWindow). >> >> I am not sure how one views the first as more succinct, but my own >> feelings are more swayed by type-safety than syntax. > > I was pointing out that the SDK exposed an object structured interface, > implemented in C, well before object oriented languages were seen > outside academia. I only meant to say that, because of the similarity in > syntax, this should have been more evident to Ada programmers than to > C++ or Java programmers. With that in mind, I found it especially odd to > see it bashed (along with everything not implemented in Ada). Certainly the Windows SDK presents an object-oriented model to the caller, but I am much more interested in type safety than object orientation, so I was not impressed when I first saw the Windows SDK. > In very large systems, interface stability is a primary requirement, not > merely an inconvenient liability. Many here are quick to point out that > "large systems" are the rightful domain of Ada. I therefore expected to > find in this crowd some understanding of the legacy issues involved. As > before with the SDK "object" syntax, I found the bashing unwarranted and > misguided. The fact that the Windows SDK is a given cannot be contested. That does not make it pleasing, and the fact that it seemed just a "pretend" effort at object orientation makes it less pleasing. By comparison, I think the X-Windows/Motif and the Macintosh GUI APIs are both more regular than the one for Windows. > Anyway, I came here to learn more about Ada, not to preach about large > system development. I'll refrain from further postings of this nature, > and hope you'll likewise use restraint in speculating about the > weaknesses of C++; I presume I already know more about those than you. We appreciate your participation, and for a C/Windows expert I think an instructive place to look (if you have not already) would be the Ada bindings to the Windows SDK. The one that is used by the Aonix GUI builder (I get the names confused), for instance, gives a good look at what people had to go through in Ada to get a set of bindings to the Windows API, and it seems to be hampered by an excessive number of slightly different types due to irregularities in the basic Microsoft definitions. Certainly it is also hampered by being a machine-generated set of bindings, but that is supposedly a self-defense mechanism to be able to adapt to Microsoft changes. But perhaps from your perspective something else is amiss in the way those bindings were constructed. Larry Kilgallen * Ada compiler support for assembly language is somewhat ameliorated by the facts that: a) nobody would ever presume such usage was portable, and: b) recent posts have shown that real beginners have a tough time figuring out how to get it working.