comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: A curiosity...
Date: Fri, 05 Dec 2008 10:03:14 +0100
Date: 2008-12-05T10:03:23+01:00	[thread overview]
Message-ID: <4938ee5b$0$31327$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <0f009ce8-0f50-4b85-9368-0d0c68f42da1@w34g2000yqm.googlegroups.com>

Ludovic Brenta wrote:

> Yes. In fact, C requires that pointers and integers be interchangable
> so as to make address arithmetic "transparent" and extremely
> dangerous.

Uhm, not interchangeable has been pointed out; this also seems
to be reflected in how Interfaces.C.Pointers is made. To me, a more
significant difference is that we do have more predefined mechanism
around Ada arrays. th + 100 is defined in C, it needs
not designate an element of an allocated array, though
(being off bounds, off the intended cell, whatever ...).
and this is not checked. You get erroneous execution,
or some kind of violation will kill the program if 100 happens
to be too much.  (C programmers might feel that they are
more skilled when they do not rely on what they might call a cane:
array bounds checking at run time, as is done in Ada and
in C++/STL (with .at)... "The C language is alright, just pick
real programmers!" is what I have heard now and then.)

When you implement an Ada storage pool, can you rely
on an Ada array to be mapped linearly to the sequence
of hardware addresses?  Is this important?



  parent reply	other threads:[~2008-12-05  9:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 20:47 A curiosity mockturtle
2008-12-04 21:17 ` Adam Beneschan
2008-12-04 21:48   ` Hyman Rosen
2008-12-04 22:04     ` Ludovic Brenta
2008-12-04 22:10       ` Ludovic Brenta
2008-12-04 22:24         ` Hyman Rosen
2008-12-05  8:02         ` Samuel Tardieu
2008-12-05 11:51           ` Peter C. Chapin
2008-12-05 13:09           ` Martin Krischik
2008-12-05 15:15             ` Hyman Rosen
2008-12-06 13:26             ` Peter C. Chapin
2008-12-05 16:37           ` Keith Thompson
2008-12-04 22:19       ` Hyman Rosen
2008-12-05  9:03       ` Georg Bauhaus [this message]
2008-12-04 22:30 ` Randy Brukardt
2008-12-04 22:57   ` Hyman Rosen
2008-12-05 16:42     ` Keith Thompson
2008-12-05 16:57       ` Hyman Rosen
2008-12-05 20:20         ` Keith Thompson
2008-12-05 20:59           ` Adam Beneschan
2008-12-06 22:53             ` Hyman Rosen
2008-12-06 23:15               ` Gary Scott
2008-12-08 15:39                 ` Hyman Rosen
replies disabled

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