From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Re: Ada & MacOS
Date: Tue, 07 Feb 2006 10:10:57 +0100
Date: 2006-02-07T10:10:57+01:00 [thread overview]
Message-ID: <ds9o71$pj9$1@sunnews.cern.ch> (raw)
In-Reply-To: <gSMFf.5573$5E3.3893@newsread1.news.pas.earthlink.net>
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? <your-pet-application-area-here>? 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/
next prev parent reply other threads:[~2006-02-07 9:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 10:53 Ada & MacOS sg
2006-02-02 14:48 ` Alex R. Mosteo
2006-02-02 17:13 ` Martin Krischik
2006-02-02 19:37 ` sg
2006-02-02 21:30 ` Björn Persson
2006-02-02 23:17 ` sg
2006-02-03 7:32 ` Jean-Pierre Rosen
2006-02-03 19:38 ` Jeffrey R. Carter
2006-02-06 10:15 ` Jean-Pierre Rosen
2006-02-03 16:27 ` Martin Krischik
2006-02-03 19:43 ` Jeffrey R. Carter
2006-02-04 7:04 ` Martin Krischik
2006-02-04 14:32 ` Georg Bauhaus
2006-02-06 8:20 ` Maciej Sobczak
2006-02-06 18:48 ` Jeffrey R. Carter
2006-02-06 20:44 ` Hyman Rosen
2006-02-07 9:10 ` Maciej Sobczak [this message]
2006-02-07 16:16 ` Martin Krischik
2006-02-08 4:51 ` Jeffrey R. Carter
2006-02-08 7:35 ` Alex R. Mosteo
2006-02-09 14:52 ` Maciej Sobczak
2006-02-06 19:25 ` Martin Krischik
2006-02-06 20:34 ` Hyman Rosen
2006-02-07 16:13 ` Martin Krischik
2006-02-03 23:55 ` Simon Williams
2006-02-04 16:22 ` Adrian Hoe
2006-02-04 16:25 ` Adrian Hoe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox