comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Q: unboxed values and polymorphism
Date: 1996/06/22
Date: 1996-06-22T00:00:00+00:00	[thread overview]
Message-ID: <DtEHCE.34x@world.std.com> (raw)
In-Reply-To: dewar.835121144@schonberg


In article <dewar.835121144@schonberg>, Robert Dewar <dewar@cs.nyu.edu> 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




  reply	other threads:[~1996-06-22  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-15  0:00 Q: unboxed values and polymorphism Hannes Haug
1996-06-15  0:00 ` Jon S Anthony
1996-06-15  0:00 ` Robert Dewar
1996-06-16  0:00 ` Hannes Haug
1996-06-17  0:00   ` Tucker Taft
1996-06-17  0:00     ` Tucker Taft
1996-06-17  0:00   ` Hannes Haug
1996-06-18  0:00     ` Robert Dewar
1996-06-22  0:00       ` Robert A Duff [this message]
1996-06-22  0:00         ` Robert Dewar
1996-06-18  0:00     ` Fergus Henderson
1996-06-17  0:00   ` Tucker Taft
1996-06-22  0:00   ` Hannes Haug
1996-06-22  0:00     ` Robert Dewar
     [not found]       ` <uvvhgryr22d.fsf@chaq.informatik.uni-tuebingen.de>
1996-06-28  0:00         ` Robert Dewar
1996-07-02  0:00           ` Fergus Henderson
1996-06-18  0:00 ` Jon S Anthony
1996-06-19  0:00 ` Hannes Haug
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox