chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Question about (use numbers)


From: Matt Gushee
Subject: Re: [Chicken-users] Question about (use numbers)
Date: Sun, 2 Mar 2014 09:00:14 -0700

Hi, Daniel--

On Sun, Mar 2, 2014 at 7:55 AM, Daniel Carrera <address@hidden> wrote:

> I have installed the numbers egg. When I run (use numbers) I get a lot of
> warnings to the effect of:

> Note: re-importing already imported identifier: +
> ....

> Does this mean that I am loading the module wrong?

No. The numbers egg redefines all the standard arithmetic 'operators'
(quotes because, as you are probably aware, they are really functions
that just happen to be represented with the symbols we typically call
operators) to work with large integers, rationals, and complex
numbers. I think the main reason for the warnings is to make you aware
of unintentional naming conflicts, but in this case the redefinitions
are deliberate and should not cause any errors.

> Incidentally, what is the difference between (require-extension xyz) and
> (use xyz)? Which one should I use?

If I'm not mistaken they are completely equivalent in Chicken Scheme.
'require-extension' is conformant with SRFI-55
(http://srfi.schemers.org/srfi-55/srfi-55.html), so in principle it is
more portable. However, according to
<http://srfi.schemers.org/srfi-implementers.html>, only 6 Scheme
implementations support SRFI-55, so I'm not sure that gives you much
of an advantage.

HTH.

--
Matt Gushee



reply via email to

[Prev in Thread] Current Thread [Next in Thread]