Re: API design problem - buffer scatter I/O



On Mon, 24 Nov 2008 21:59:41 -0800 (PST), christoph.grein@xxxxxxxxxxxxxx
wrote:

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:

I agree with you. Pointer to a subtype is not necessarily a subtype of the
pointer to the base. That is not an implementation detail. It should be per
programmer's choice. Unfortunately Ada lacks means to propagate type
constraints between related types, which is the issue here. We need a way
to say whether the constraint has to be moved from the target to the
pointer, making the later unconstrained. That does not necessary imply that
the pointer's representation must become "fat." That indeed would be an
implementation detail, as Robert says. But the decision is not a detail.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: sizeof() structure member
    ... c.c:8: warning: ISO C forbids conversion of function pointer to object pointer type ... C99 6.5.4, which describes the cast operator, has the following constraints, ... Unless the type name specifies a void type, ...
    (comp.lang.c)
  • Re: marshall interface needed?
    ... don't need to know nor care that A uses B at all. ... and properly marshal A's pointer. ... A is registered as an MTA component, and expects to be called on an MTA ... internal implementation detail of A, of which you shouldn't know nor ...
    (microsoft.public.vc.language)
  • Re: sizeof() structure member
    ...     return 0; ... c.c:8: warning: ISO C forbids conversion of function pointer to object pointer type ... C99 6.5.4, which describes the cast operator, has the following constraints, ...
    (comp.lang.c)
  • Re: [RFC][v7][PATCH 0/9] Implement clone2() system call
    ... Sukadev Bhattiprolu wrote: ... No, as Arnd pointed out, we already pass in a pointer to 'struct clone_struct' ... and the kernel can use that pointer to copy the parent and child tids. ... you place a constraints on where userspace may ...
    (Linux-Kernel)
  • Re: struct named 0
    ... >> structure, suitably cast, is also a pointer to its first member. ... Arrays are not first class objects and do not ... except that the constraints on the operators still apply and ... if the operand is the result ...
    (comp.lang.c)