Re: [C--] C-- development

Hendrik Boom <[email protected]> Wed, 13 Mar 2013 21:20:54 +0000 (UTC)
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
On Wed, 13 Mar 2013 16:06:56 -0400, John Cowan wrote:

> Hendrik Boom scripsit:
> 
>> Algol 68 array elements are not necessarily spaced apart by a multiple
>> of the size of an element.
> 
> That's a bad idea: on some platforms performance will go to hell if you
> attempt unaligned array accesses, and on others it simply will not work
> at all.  Furthermore, you won't be able to interoperate with other
> languages on the same platform, which is a recipe for language death --
> "something humorous, but lingering, with either boiling oil or melted
> lead", as the Mikado says.

Here's how this can arise.
Say you have some structures:
   mode little = struct(int a,int b);
   mode big = struct(little c, int d);
then an array of big's will have elements spaced every 12 bytes if int's 
are 4 bytes.
But you can select a field from an array of sructures, giving an array of 
fields.
declare a variable v:
   big v[67];
this gives you 67 big's.
and 
   c of v
gives you the 67 littles inside those bugs -- 8-byte elements spaced 
every 12 bytes.

-- hendrik
'
-- hendrik

_______________________________________________
Cminusminus mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/cminusminus