Jon Lang dataweaver-at-gmail.com |Perl 6| wrote:
; I see.  We just had a role-vs-class cognitive disconnect.
Officially, Num is the autoboxed version of the native floating point
type (i.e., 'num').  Somehow, I had got it into my head that Num was a
role that is done by all types that represent values on the real
number line, be they integers, floating-point, rationals, or
irrationals.  And really, I'd like Num to mean that.  I'd rather see
what is currently called 'num' and 'Num' renamed to something like
'float' and 'Float', and leave 'Num' free to mean 'any real number,
regardless of how it is represented internally'.  Either that, or
continue to use Num as specified, but also allow it to be used as a
role so that one can create alternate representations of real numbers
(or various subsets thereof) that can be used anywhere that Num can be
used without being locked into its specific approach to storing
values.


Would you care to muse over that with me: what Roles should we decompose the various numeric classes into? Get a good list for organizing the standard library functions and writing good generics, and =then= argue over huffman encoding for the names. Call them greek things for now so we don't confuse anyone <g>.

--John

Reply via email to