[omniORB] Re: [fnorb] Re: Promoting from integer to double in a union?
Derek Thomson
derek@ooc.com.au
Tue, 21 Mar 2000 10:59:51 +1000
Jason Tackaberry wrote:
>
> > I didn't really expect this to work, but it does with Fnorb and
> > omniORB. On the other hand, with orbit-python I get an exception:
> >
> > CORBA.SystemException: IDL:omg.org/CORBA/BAD_PARAM:1.0:
> > Expected float, got int
>
> I was debating about whether or not I should promote ints to floats. For
> consistency and readability, I decided to require a float value. Also,
> the Python Language Mapping Specification doesn't explicitely permit
> integers here (I think).
The "Python Way (tm)" seems to be to insist on explicit conversions between
basic types, so implicit conversions at the ORB interface would be inconsistent.
Whether or not a rapid prototyping scripting language should insist on having
the programmer continually perform basic type conversions is another debate.
The next release of Fnorb will have these type checks, so that instead of
performing the obvious conversion, it will just give up and fall over with an
exception. Just like Python itself. Now *that* is progress. Sigh.
Regards,
Derek