chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Bug in SRFI-13 lib?


From: Matt Gushee
Subject: Re: [Chicken-users] Bug in SRFI-13 lib?
Date: Sat, 16 Feb 2008 17:46:10 -0700
User-agent: Thunderbird 2.0.0.9 (X11/20071212)

Elf wrote:

please read the srfi doc for what string= means. it involves the index of the char not following/following certain lexicogaphical ordering constraints,

Yes, I read that, and I can guess that a result of N means that the strings are equal up to the Nth code point. But:

and should be returning an integer.

Even though the function signature in the spec

  http://srfi.schemers.org/srfi-13/srfi-13.html#Comparison

plainly says that it returns a boolean? Now, I already knew that an integer is equivalent to #t in (if), (and), (cond), etc. So, maybe I don't understand how to interpret an SRFI document, but doesn't this all mean that

  string= MAY [not SHOULD] return an integer

?

In which case, isn't an integer return value an *extension* to the spec, and thus not reliably portable?

I don't mean to be a nuisance about this -- it's a minor issue, of course, but stuff like this bugs me. All I really want to know is:

  Does string= in Chicken return an integer because it is considered
  more useful than #t? And if so, how? Or was it simply easier to
  implement the function that way?

Thanks for your responses.

--
Matt Gushee
: Bantam - lightweight file manager : matt.gushee.net/software/bantam/ :
: RASCL's A Simple Configuration Language :     matt.gushee.net/rascl/ :




reply via email to

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