From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,616091a85ff150f1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-05 11:36:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Ada 200X Assertions Date: Wed, 5 Dec 2001 19:36:01 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3C0C48BE.3B20F04E@adaworks.com> NNTP-Posting-Host: belenus.iks-jena.de X-Trace: branwen.iks-jena.de 1007580961 28746 217.17.192.34 (5 Dec 2001 19:36:01 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 5 Dec 2001 19:36:01 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:17468 Date: 2001-12-05T19:36:01+00:00 List-Id: * Matthew Heaney wrote: >"Lutz Donnerhacke" wrote in message >> Typical example 2: A head node of a linked list contains a next pointer >> which should be handled exactly as the next pointer of the real >> list nodes, but no payload at all. > >In the code below, I do this by making the List_Type a private derivation of >a Node_Type. Which means a List_Type, containing only the head pointer, can >be used exactly like Node_Type. > type Node_Type is abstract tagged private; > type List_Type is new Node_Type with private; That's not a generic mixin. My job is: task type Bla is ...; type Blas is array (Positive range <>) of Bla; type Foo (len : Natural) is abstract record t : Bla (Positive'First .. len); end record; procedure Process (a : Foo) is abstract; package Bla_List is new List (Bla); package Bla_List2 is new List (Bla); In short: I'm looking for a extension of existing types to well known data structures. >> >Of course the language already allows you to move from a pointer to >> >component to a pointer to aggregate: just use an access discriminant. >> >> This generates a completely different structure. > >What's wrong with that? The memory layout shared by some hardware. Thanx for your non generic examples.