Re: your mail

Pedro Szekely ([email protected])
Wed, 12 Apr 1995 17:49:24 PDT

JK and Ewald,

>
> Ewald,
>
> I noticed something in the IDL code above that is irrelevant to my
> previous question. In any case, the way I am interpreting statement (i)
> is that since sizeof(double) > sizeof(any primitive type), we are using
> a double to store all primitive types. My guess is that things will
> just get casted when they are used.
>
> The casting will work fine, as long as we don't use CORBA. When we
> are talking about distributed objects, the way an integer is encoded is
> different from the way a double is encoded. So, if we store an int in
> a double, and pass it around to objects in other address spaces, we probably
> will not get the same value at the other end. I have a feeling this will
> be a problem with the current structure. But, I may be wrong. Please, let me
> know what you think about this. Thanks.
>

I think that JK might be right about this. If we represent any's "in the
right way", with a true union, does it mean that we need to allocate storage
for the sum of all possibilities? As I remember, the rationale for using the
double was to avoid allocating too much storage.

If JK is right about this potential problem, we need to represent things
correctly. Maybe we can play a trick where if we compile for NON-CORBA, less
storage gets allocated.

Pedro Szekely
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292
Phone: 310/822-1511, Fax: 310/823-6714
URL: http://www.isi.edu/isd/szekely.html