Larry Wall wrote:

: ---------------------------------------------------------------------
:   Num                 :     : Base Numeric type
:     Int               :     :
:     Float             :     :
:     Complex           :     :

This bothers me.  The reason we put in Num in the first place was to
get rid of things like Float and Double.  Every time I see "Float"
or "Double" in a Perl 6 program I will feel like a failure.

I'd suggest the the concepts of "Real" and "Int" are sufficiently distinct to warrant types (The term "Float" is bad IMO because it implies a specific style of implementation -- A Real could, in principle, be implemented as a fixed-point value).

An Int is Enumerable: each value that is an Int has well defined succ and pred values. Conversely, a Real does not -- and so arguably should not support the ++ and -- operators. Amonst other differences, a Range[Real] is an infinite set, whereas a Range[Int] has a finite cardinality.

(perhaps this discussion belongs on p6l)

Reply via email to