Typing system vs. Java

Greg Ewing greg at cosc.canterbury.ac.nz
Fri Aug 3 01:15:49 EDT 2001


Alex Martelli wrote:
> 
> Not
> to mention the peculiar implication of having INTEGER ranges as a
> built-in language feature, and REAL ranges nowhere to be seen

I think that's because various other language features
made use of the existence of ordinal subrange types,
such as array indexes and set types. There is nowhere
else in the language that real subranges are used,
so presumably Mr. Wirth didn't consider there was
enough justification for building them in.

Also, given the imprecision of comparing floats,
it could be difficult to pin down whether a given
value should be considered legal for a given
subrange in some cases. Discrete subranges are
much easier to write precise statements about
in language definitions.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list