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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7dbba1cd16d32bb8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Ada OOP syntax Reply-To: anon@anon.org (anon) References: <_9adnb1KYvIrW87VnZ2dnUVZ_vOdnZ2d@comcast.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sat, 14 Jun 2008 21:22:35 GMT NNTP-Posting-Host: 12.64.126.237 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1213478555 12.64.126.237 (Sat, 14 Jun 2008 21:22:35 GMT) NNTP-Posting-Date: Sat, 14 Jun 2008 21:22:35 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:707 Date: 2008-06-14T21:22:35+00:00 List-Id: There are three thing about OPPs and Ada. First, the concept of OOP reached it highest point after Ada 95 was out. And since then it has falling out of favor with most programmers that are not writing GUI applications. Also, most Ada partitions are not GUI based. Second, during the vote for Ada 2005/2007 specs the only major player was Adacore creators of the GNAT Ada. But some of the major OOP designers such as IBM, current UNIX owner (I do not use their name), Apple, Sun, and etc stay way from addressing or voting on Ada 2005/2007 specs or about OOP. That's one reason Adacore's GNAT is the only Ada 2005 package around. Third, Microsoft which is the biggest OPP player around has never dealt with Ada as a language. So, if you want OOPs in a big way you will need to use another language. In <_9adnb1KYvIrW87VnZ2dnUVZ_vOdnZ2d@comcast.com>, "Steve" writes: >For a programming language that has so much right, Ada sure has oop syntax >wrong. What's more is the syntax is inconsistant with a lot of things that >Ada got right and other languages didn't. > >One of the strengths of Ada is the lack of ambiguity in code. > >In Pascal you have either: > > if then > statement; > >or: > > if then > begin > end; > >or: > > if then > begin > end > else > begin > end; > >In C/C++/C#/Java you have a similar arrangment. > >In Ada you have: > if then > end if; >or > if then > else > end if; > >When you're reading Pascal/C/C++/C# or Java code you have to hunt and look >very carefully to figure out the end of an if statement. It isn't so hard >when you have a small block of code, but when you run into a bigger block >with nested for, while, and if statements it can get pretty tricky. Ada is >much improved in that regard since the end of an if statement is clearly >marked with an "end if". > >Ada is has similar constructs for loops, records, block declarations, etc. > >Tagged type definitions, IMO are an abomination. If you look at Delphi (an >object oriented version of Pascal), or C++, C# or Java, there is no >ambiguity of the scope of the entities that belong to an object. > >In Ada there are rules that define the scope of an object. In my opinion >this syntax deficiency is the reason the "overriding" and "not overriding" >constructs were added to Ada 2005. They improve the situation, but you >still have to look closely to figure out which entities belong to which >objects. > >Sure you can use a programming convention to always define one tagged type >per package, just like you can use a convention in C++ to always add an "// >end if" comment after a closing bracket, but I would expect it to be a >requirement of the language. > >Don't try to respond by explaining how to deal with tagged type definitions >in Ada. I already understand and have used them. It's just that when I >work with OOP in Ada it's kind of like the drudgery of working with other >more deficient programming languages. > >Perhaps the language could be enhanced to permit an alternate syntax that >clearly defines the scope of a class (or tagged type if anyone is stuck on a >name) and a pragma to only permit the alternate syntax added? > >Regards, >Steve > > > >