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 Bushnell BSG
Subject: Re: [Chicken-hackers] bit-set? is inconsistently specified
Date: Mon, 03 Aug 2009 16:18:54 -0700

On Tue, 2009-08-04 at 00:34 +0200, Thomas Chust wrote:
> 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!

I agree completely that, if this were being designed from the beginning,
the Chicken order is better than the srfi-60 order.  Yet, I don't think
we get to deal with that.

Thomas






reply via email to

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