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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe82bd3a72926e1a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 00:05:00 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!freenix!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.easynews.net!newsfeed2.easynews.net!easynews.net!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: "Size" of Ada vs. C++ Date: Tue, 16 Oct 2001 08:51:07 +0200 Organization: Enyo's not your organization Message-ID: <87y9mcoz6s.fsf@deneb.enyo.de> References: <9q223u$lap2j$1@ID-77397.news.dfncis.de> <87ofn8a9dv.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: archiver1.google.com comp.lang.ada:14631 Date: 2001-10-16T08:51:07+02:00 List-Id: Ted Dennison writes: >>I'm not sure if this is true if you look at the language core only >>(and don't take into account any non-essential run-time library >>components, such as containers or valarrays). > > Then explain in one simple paragraph how C++ constructors and > destructors work I'm going to do that if you describe how to implement smart pointers in Ada (without taking advantage of an implementation permission). ;-) > This is all stuff that is pretty much required for basic C++ programming, and > its more arcane and exception-riddled than most English spelling rules. This is very true, but it doesn't make Ada a smaller language than C++ per se. > If we throw out annex-based libraries as you suggest, Ada doesn't even *have* > constructors and destructors to talk about. :-) Section 7.6 is not in Annex A. > Or we can compare the "cast system" of the two languages. Ada's rule > is pretty simple: the types have to be derived from each other, or > predefined numeric types. C++ on the other hand, has at least 3 > different types of cast, plus an old fashioned implicit one. What about Ada.Unchecked_Conversion? It's comparable to reinterpret_cast<>. > To make things more interesting, constructor writers > can inadvertently create new implicit ones if they aren't careful... That's why the "explicit" keyword was introduced. Anyway, I think it's rather strange to judge a language by the "size" of its definition.