chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] bit-set? is inconsistently specified


From: Thomas Chust
Subject: Re: [Chicken-hackers] bit-set? is inconsistently specified
Date: Tue, 4 Aug 2009 00:34:39 +0200

2009/8/3 Thomas Bushnell BSG <address@hidden>:
> The chicken scheme library unit defines bit-set? as
>
>        [procedure] (bit-set? N INDEX)
>        Returns #t if the bit at the position INDEX in the integer N is
>        set,   or #f otherwise. The rightmost/least-significant bit is
>        bit 0.
>
> Alas, this is inconsistent with srfi-60, which has the parameters in the
> opposite order [...]

Hello,

this is unfortunate indeed. However the convention of passing the
composite object first and the index after it is much more widespread
than what SRFI-60 apparently does. By the principle of least surprise
I would always have expected to find the parameters in the order
CHICKEN currently uses!

cu,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.




reply via email to

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