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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8de933d44255f226 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Q: unboxed values and polymorphism Date: 1996/06/22 Message-ID: #1/1 X-Deja-AN: 161546917 references: organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-06-22T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >You are encoding at a very low level, appropriate for C (since it is the >only way to do things), but totally inappropriate for Ada. You need a >variant record with a discriinant to indicate whether you have fixnums >or indices. The discriminant would be a single bit. And the pointer would be 31 bits, so the whole thing fits in 32? Quite reasonable, except that I've never heard of an Ada compiler that can support that kind of packing. Certainly, the RM does not require support for that sort of packing. No, I think the low-level technique used to do this in C is exactly the same low-level technique that is necessary in Ada. The nice thing about Ada is that it allows you to isolate such low-level stuff from the bulk of your application. - Bob