[Types-sig] Re: puzzle about subtyping and parameterization

Guido van Rossum guido@CNRI.Reston.VA.US
Wed, 19 Jan 2000 14:49:11 -0500


[Jeremy]
> I thought I had a solution until you mentioned strings :-(.  For
> numeric types, I was going to propose that number be used most of the
> time, and that 1/2 == .5 and that 2**45 doesn't raise an
> OverflowError.  If most programs use this version of number, then we
> can afford to give funny names to what you have called 'int' and
> 'integer' because most programs won't use them.

That would be acceptable for Python 2.0, but unfortunately not for
1.6; there are lots of places where 'int' is required by the runtime
(e.g. indexing).

> How about 'fixnum' for what is now IntType and 'int' for IntType and
> LongType?

I would do it the other way around: int == IntType, long == LongType,
fixnum == int|long (or perhaps fixnum should encompass *all* integral
types).

>   GvR> I'm reluctant to introduce case differences; many people don't
>   GvR> notice the difference between Int and int anyway.
> 
> Yikes!  I'm worried that you're only "reluctant" and not "morally
> opposed."

Funny, I edited it down from stronger language.  I meant in addition
to different words, e.g. concrete types (int, long etc.) are lowercase
but abstract types start with an capital, e.g. Integer, Number, Any.
(None will always be an exception. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)