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-Thread: 103376,59d666bca086a225 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Ada & MacOS Date: Tue, 07 Feb 2006 10:10:57 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <1776691.hMkAr8ZQHy@linux1.krischik.com> <6SuEf.155126$dP1.513381@newsc.telia.net> <1289921.BRApYLEfLn@linux1.krischik.com> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1139303457 26217 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060203 Red Hat/1.7.12-1.1.3.4 X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:2805 Date: 2006-02-07T10:10:57+01:00 List-Id: Jeffrey R. Carter wrote: >> Same for C++. One of the users of my recent code (non-trivial, I would >> say) compiled it on MacOS by typing "make", even though I've never >> touched Mac. So? > > Using which compilers and what language features? Very few "C++" > compilers implement the language defined by the ISO standard. You may find it funny, but since nobody implements the "export" feature, then nobody uses it, and then in turn it's not a problem that nobody implements it. Similarly, you will not find this feature described in beginner's books, nor lectured in courses. For this reason, the one compiler which claims to support this feature did not get immediate market advantage exactly because there's no code (and no programmers - not counting few die-hard enthusiasts) that would benefit from this. And for the same reason, other vendors don't rush to implement it. So, no, I cannot use *all* the ISO features, but since I'm not using them anyway, I don't find it to be a showstopper. There is a bunch of good compilers targetting most of the platforms I'm interested in and I don't find any problems moving my code from one platform to another. > With Ada, the entire standard language is compiled by every compiler; a > compiler that didn't implement, say, generics, would be laughed out of > existence. Yet "C++" users regularly use compilers that don't implement > templates, exceptions, or namespaces. Really? Taking into account what I've seen during the last few years on comp.lang.c++.moderated, I'd say that today such compilers are extraordinarily rare, something like a living mammoth. I don't call it "regularly use". > Ada compilers can implement compiler-dependent pragmas and attributes, > and can supply compiler-dependent packages. Many also supply > platform-dependent packages. If you use those, you're not writing > portable code. If you stick to the standard language, though, > portability is pretty much guaranteed. Yes, sure. Same for C++ - stick to the standard library and you're done. The problem is that both Ada and C++ have *very* small standard libraries, especially when compared to what you can get from Java or .NET stuff. This means that apart from reading from and writing to files, there's not much the fully compliant program can do. Not counting some extremely encapsulated environments (like embedded), every application needs to rely on some non-standard library. Network? GUI? XML? Databases? ? Say I want to write a mail client in Ada - obviously some network and GUI stuff would be needed. Then what? Of course, I can use some non-standard library(ies) for this. But since the library is non-standard, it does not fall under the "we have a standard test suite" label, so the foundation to boast unprecedented portability is no longer there. I'm writing this from Mozilla, written in C++, running happily on most desktop platforms you can find today. Have Mozilla been written in Ada, it wouldn't be much more portable. > GNAT is an interesting beast. Versions exist for a number of platforms, > and it comes with a large library (GNAT.*) that is compiler dependent, > and much of it (such as GNAT.OS_Lib) seems platform dependent, too. > These work fine on all platforms that GNAT compiles to. So you have > compiler-dependent but platform-independent packages with GNAT. In C++ there are libraries, which are platform-independent and compiler-independent as well (see for example www.boost.org). The portability achieved with those libraries is very high. BTW - why do you write "C++" in question marks, and Ada without them? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/