comp.lang.ada
 help / color / mirror / Atom feed
From: David Trudgett <wpower@zeta.org.au.nospamplease>
Subject: Re: Charles container library usage examples
Date: Mon, 12 Sep 2005 07:14:58 +1000
Date: 2005-09-12T07:14:58+10:00	[thread overview]
Message-ID: <m3slwb488d.fsf@rr.trudgett> (raw)
In-Reply-To: 43240c16$0$27555$9b4e6d93@newsread4.arcor-online.net

Georg Bauhaus <bauhaus@futureapps.de> writes:

> David Trudgett wrote:
>
>> Slow execution is also somewhat relative. Ada is slower than C, for
>> instance, unless you disable run-time checks (an Ada strength), and
>> even then Ada may still have extra features/overhead that C doesn't
>> have.
>
> There is some overhead in C programs, too, when they have explicit
> checking code to compensate for what C doesn't have. 

Yes, this is quite true[1], in theory, as well as no doubt in practice (I
don't have heaps of experience in the C world, so that's all I can
say). On the other hand, with C, you only have to overlook or forget,
or have over-towering confidence in one's coding ability, or not know
any better, and that's it, you've shot yourself in the foot, so to
speak (but you've done it real fast!). Ada feels a lot, LOT safer! :-)

I was just writing some Ada code yesterday. It was a case statement
and I had forgotten to take care of one possible case. Naturally, the
Ada compiler helpfully reminded me. This isn't a run-time check, of
course, but still useful.

On the subject of about compiler reminders, I'm also very impressed by
Gnat's error and warning messages. Talk about helpful! I've never used
a compiler with clearer or more useful messages. "You have mispelled
'return'" (or similar) is just one minor example that comes to mind! :-)


> This code isn't necessarily visible to the C compiler as checking
> code, I 'd say, whereas checks implied by the Ada language are
> visible to the compiler in this sense.

I'm not sure what the point is here. What does being "visible" to the
compiler mean in that sense? Is that more important than the simple
fact of being present (because the Ada compiler ensures it is)?


David

[1] It is also true in the case people accuse Lisp, for example, of
being slow. If other languages actually did the things that Lisp does,
there wouldn't be any talk about speed differences!

-- 

David Trudgett
http://www.zeta.org.au/~wpower/

The operative definition of "crime" is: "Crime that you carried out
but we did not." To underscore the fact, Nazi war criminals were
absolved if the defense could show that their US counterparts carried
out the same crimes.

Taylor concludes that "to punish the foe -- especially the vanquished
foe -- for conduct in which the enforcer nation has engaged, would be
so grossly inequitable as to discredit the laws themselves." That is
correct, but the operative definition also discredits the laws
themselves, along with all subsequent tribunals.  Taylor provides this
background as part of his explanation of why US bombing in Vietnam was
not a war crime.  His argument is plausible, further discrediting the
laws themselves.  Some of the subsequent judicial inquiries are
discredited in perhaps even more extreme ways, such as the Yugoslavia
vs. NATO case now being adjudicated by the International Court of
Justice.  The US was excused, correctly, on the basis of its argument
that it is not subject to the jurisdiction of the Court in this case.
The reason is that when the US finally signed the Genocide Convention
(which is at issue here) after 40 years, it did so with a reservation
stating that it is inapplicable to the United States.

    -- Noam Chomsky
       <http://www.chomsky.info/articles/20041217.htm>



  reply	other threads:[~2005-09-11 21:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-03  2:38 Charles container library usage examples David Trudgett
2005-09-03  5:15 ` Matthew Heaney
2005-09-03  9:45   ` Simon Wright
2005-09-04  6:25     ` David Trudgett
2005-09-05 11:28       ` Georg Bauhaus
2005-09-04  0:26   ` David Trudgett
2005-09-04  9:49     ` Matthew Heaney
2005-09-06  3:01       ` David Trudgett
2005-09-06 16:22         ` Jeffrey Carter
2005-09-07  0:15         ` Matthew Heaney
2005-09-04 17:19     ` Ludovic Brenta
2005-09-06  3:01       ` David Trudgett
2005-09-06  5:08         ` Ludovic Brenta
2005-09-06  6:46           ` David Trudgett
2005-09-06  7:26             ` Ludovic Brenta
2005-09-24  0:05               ` Randy Brukardt
2005-09-09 14:57         ` James Alan Farrell
2005-09-10  7:38           ` David Trudgett
2005-09-10 14:55             ` Matthew Heaney
2005-09-10 15:26               ` Ludovic Brenta
2005-09-10 17:58                 ` Matthew Heaney
2005-09-12  0:24               ` Robert A Duff
2005-09-11 10:52             ` Georg Bauhaus
2005-09-11 21:14               ` David Trudgett [this message]
2005-09-13 23:41                 ` Björn Persson
2005-09-14  6:39                   ` David Trudgett
2005-09-12  0:21             ` Robert A Duff
2005-09-12  0:57               ` David Trudgett
2005-09-12  1:01                 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox