David Mitchell wrote:
> Well, I was assuming that there would be *a* numeric class in scope
> - as defined be the innermost lexical 'use foo'.

And that numeric class would remove int and num from the scope?

> I assumed that Perl wouldn't be clever enough to know about all available
> numberic types and automatically chose the best representation; rather
> that it was the programmer's responsibilty via 'use' or some other syntax.

Well "some other syntax" leaves it pretty wide open doesn't it. ;) IMHO we
should shoot for "clever enough" (aka DWIM) and fall back to putting the
burden on the programmer if it gets too hard for Perl.

> I'm not familiar with Scheme, I'm afraid.

Scheme directly implements the sets of numbers (the numeric tower):

  integer -> real -> complex

It's complicated by having multiple representations for the numbers:
small fixed point, fixed point, and "big", but the main idea is
that Scheme figures out when to shift both type and representation
automatically. Unfortunately different implementations usually choose
different portions of the numeric tower to implement.

- Ken

Reply via email to