[omniORB] Re: Promoting from integer to double in a union?

Duncan Grisby dgrisby@uk.research.att.com
Tue, 21 Mar 2000 10:35:17 +0000


On Tuesday 21 March, Derek Thomson wrote:

My apologies to everyone on omniORB list who couldn't care less about
Python...

> 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.

It isn't true that Python always requires explicit conversion:

Python 1.5.2 (#7, Jun  4 1999, 14:52:53)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 2 * 0.5
1.0
>>> 1 + 2L
3L

So there is a precedent for promoting integers to floats and longs,
hence omniORBpy's support for it.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --