From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: API design problem - buffer scatter I/O
Date: Tue, 25 Nov 2008 09:25:03 -0500
Date: 2008-11-25T09:25:03-05:00 [thread overview]
Message-ID: <wcc7i6r51ds.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 0b91f255-820a-4901-9785-746e0f01c788@g38g2000yqd.googlegroups.com
christoph.grein@eurocopter.com writes:
> Thank you, Bob, for these illustrative comments. Problems with wiki is
> that people with no good knowledge about the innards of a language
> implementation may contribute (and I include myself into this class).
>
> I fear you do not feel like correcting the wiki. I know, it's much
> work, the whole chapter has to be rearranged.
You're right -- I don't have time to do a good job of that,
so I'm not even going to try.
I do appreciate the efforts of others who choose to help out
with the wiki, even if it's not always perfect.
>> >...This is not an implementation
>> > detail.
>>
>> Sure it is. �How a compiler represents data types (including access
>> types) is an implementation detail.
>
> What I meant is the incompatibility between pointers to constrained
> and unconstrained:
>
> type Unc is array (Integer range <>) of Character;
> type Acc_Unc is access Unc;
>
> CO: aliased Unc (-1 .. +1) := (-1 .. +1 => ' ');
> UO: aliased Unc := (-1 .. +1 => ' ');
>
> A: Acc_Unc := CO'Access; -- illegal
> B: Acc_Unc := UO'Access; -- OK
> C: Acc_Unc (CO'Range) := CO'Access; -- also illegal
>
> which is not an implementation detail.
Ah, sorry, I misunderstood what you were referring to. I agree that
this restriction (A is illegal) is not an implementation detail. The
declaration of A makes perfect sense, but it is forbidden for efficiency
reasons. Well, not efficiency, really -- distributed overhead. Some
say that was a bad language design choice, and I'm at least half
convinced. ;-)
I'd suggest removing C from the wiki. Constrained subtypes of access
types are a weird and nearly-useless feature. I wouldn't teach
about them to beginners -- they're confusing.
- Bob
next prev parent reply other threads:[~2008-11-25 14:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 16:05 API design problem - buffer scatter I/O Maciej Sobczak
2008-11-22 16:54 ` sjw
2008-11-22 19:43 ` george.priv
2008-11-22 22:16 ` Robert A Duff
2008-11-22 23:34 ` Maciej Sobczak
2008-11-23 0:01 ` Robert A Duff
2008-11-24 8:10 ` Brad Moore
2008-11-24 7:55 ` christoph.grein
2008-11-24 20:03 ` Robert A Duff
2008-11-25 5:59 ` christoph.grein
2008-11-25 8:34 ` Dmitry A. Kazakov
2008-11-25 14:25 ` Robert A Duff [this message]
2008-11-25 22:20 ` Randy Brukardt
2008-11-24 21:23 ` Robert A Duff
2008-11-22 23:01 ` Georg Bauhaus
2008-11-23 5:57 ` anon
2008-11-24 17:16 ` tmoran
2008-11-26 8:34 ` Maciej Sobczak
2008-11-26 20:39 ` sjw
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox