[r6rs-discuss] [Formal] Clean-up in the additional arithmetic libraries
On Nov 15, 2006, at 1:48 PM, Alan Watson wrote:
> Now, if you import a routine called "+" from (r6rs arithmetic
> fixnum), it no longer works on things like[*] "2.3". Therefore,
> from the point of view of that routine, "2.3" is no longer a
> number. If it isn't a number, it can't be a real.
A developer who is importing the different libraries should not be
writing code that uses the predicate real? to act as the fixnum?
predicate. Its an invitation for confusion, in my opinion.
I've realized since I wrote my comment that a reasonable refinement
might be for the libraries such as (r6rs arithmetic fixnum) to export
a single predicate, named num?
Then, when you add the appropriate prefix at the import site, you end
up with fix:num? or fixnum? (depending one whether you choose the
prefix fix: or fix).
I would be satisfied with a solution along these lines; it sounds
like this would satisfy you as well...
-Felix
Received on Wed Nov 15 2006 - 16:43:48 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:00 UTC