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,2510538eb4348710 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-20 01:22:11 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.27.83.146!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: A generic list package Date: Thu, 20 Sep 2001 08:21:50 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <87ae0dp7gn.fsf@deneb.enyo.de> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1000974110 26134 217.17.192.37 (20 Sep 2001 08:21:50 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Thu, 20 Sep 2001 08:21:50 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:13202 Date: 2001-09-20T08:21:50+00:00 List-Id: * Simon Wright wrote: >lutz@iks-jena.de (Lutz Donnerhacke) writes: >> >lutz@iks-jena.de (Lutz Donnerhacke) writes: >> >> I prefer this the other way around: >> >> >> >> +------------------+ >> >> | actual data | >> >> | | >> >> | fields specific | >> >> | to the container | >> >> >> >> This allows me to cast pointers ;-) > >What makes you think that the order the compiler lays out the record >is the same as the order you wrote the components in? The tagged record type to be extened is already finalized. I do not care how the compiler adds the data structure componds, but (automatic) type conversions between parent and derivated types become very difficult if the extension fields are mixed with the parent ones. In conclusion: I program unportable unless I find the rule in the RM. -- Mailbox der letzten vier Wochen kommentarlos in den Orkus getreten. Wichtige Anfragen bitte nochmal senden. Unter Angabe von Msg-ID oder markanten Suchworten, kann ich die Mails jedoch heraussuchen.