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=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-03 23:25:27 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!drn From: mike@nospam Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp Date: 3 Oct 2001 23:01:57 -0700 Organization: Newsguy News Service [http://newsguy.com] Message-ID: <9pgu0l01687@drn.newsguy.com> References: NNTP-Posting-Host: p-276.newsdawg.com X-Newsreader: Direct Read News 2.90 Xref: archiver1.google.com comp.lang.ada:13706 Date: 2001-10-03T23:01:57-07:00 List-Id: In article , Pi says... > > >You say that it's text-based. >Do you have to parse the text-input? >In this case I would consider using Perl[1] for the parsing >and than the actual treatement in Ada. >(Strings aren't Ada's strength) > first, perl is ugly. it is write-only language. second, I think Ada is brilliant for strings, I used only standard Ada packages for strings, and the standard Ada library strings are quite good. and even though I have worked much in it, I understand that GNAT has now snobol-like package (and you can't say sbitbol aint for strings) and GNAT also has perl like reqular expressions package too. (even Java 1.4 has now a reqular expression classes, so there is no reason to use perl anymore :) >2nd : Objects : >as long as you dont need special features you're fine with Ada. >Just consider a package like an object and you're cool. > I think the confusion comes from this: In java, the most popular OO language these days, a package is really nothing but a directory where files exist in it. Each file represents a class (not considering inner and private classes for the moment). i.e. in Java class <---> own file In Ada, a package is declared/defined in a file. i.e. Ada package <--> own File very loosely put. So, the object in Ada sits in a file that "belong" to a package. This is the core difficulity many face when trying to use Ada OO features I think. Now DELPHI has the same thing as Ada, but in DELPHI, an object has it own 'class' key work inside a package, which makes it less confusing to some. It is all syntax suger, and at the end it all comes down to the same thing, but in Ada it does take a little more time to get used to doing OO if one comes from Java or C++. It is all about the object.method() vs. method(object) notation. > >4th : Polymorphism >Argh, only possible with tagged type and true crap, so stick with C++ I do not understand the above. a tagged record is a record you can extend, what is so hard about it? think of a tagged record + its operations as a class. >5th : Multiple Heritage >Not possible with Ada. > big deal. MI is not possible in Java too, but I do not see it stopping people from using Java (2.5 million programmers use Java these days and counting). >[1] Perl is your worst nightmare for big project, >but the best language for text parsing out there, >so if you use it, use it *only* for the parsing. Untill you get to have to fix the code, then you are stuck wasting hours and hours trying to figure what the code does. There is no perfect language. May be someone should invent a language which looks like Java, but acts like Ada, then it will be a real winner :) Java has nice global features, but week at the core languge level (it is like an enterprise version of VB). Ada is best engineered language, but not much window dressing on it to attract the industry. Try to do an enumeration type in Java with the same features that comes with Ada per-build, and you'll see what I mean. (one simple example). There is a whole section (2-3 pages) in 'effective Java' book on how to make an enumeration type safe in Java, and at the end, it does not give you 5% of what Ada enumeration does in one line.