This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: another nit.


>>>>> "MLivshin" == Michael Livshin <mlivshin@bigfoot.com> writes:

    MLivshin> Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
    >> On Thu, 6 Jul 2000, Han-Wen Nienhuys wrote:
    >> 
    >> > why do assq-ref and friends return #f when the key is not
    >> found, in > stead of #<unspecified>? This makes it kind of hard
    >> to distinguish > between an alist not containing KEY and (KEY
    >> . #f)
    >> 
    >> Actually, it would be best to throw an error if the key is not
    >> found.

    MLivshin> no.  it would introduce a Guile-specific aspect into an
    MLivshin> otherwise portable specification.

Since assq-ref is suppose to "rhyme" with vector-ref, and vector-ref
throws an error, it seems like assq-ref should throw and error as
well.  Different schemes handle vector-ref out of bounds errors
differently so I don't see the problem with assq-ref throwing an error
in a GUILE specific way (vector-ref does too).  

Clark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]