[R6RS] inconsistent naming of arithmetic predicates

Anton van Straaten anton at appsolutions.com
Thu Jun 29 15:54:57 EDT 2006

Will wrote:
> I would like to rename the SRFI 77 predicates
> by adopting one of these two rules:
>  1. No question mark is added for predicates
>     corresponding to =, <, or >.

Is that intended to include >= and <= ?  If not, I think it should.

>  2. If the predicate contains any letters at
>     all, then it ends with a question mark.
> These two rules would give us these options:
>  1. =
>     fixnum=
>     fx=
>     fl=
>     exact=
>     inexact=
> or
>  2. =
>     fixnum=?
>     fx=?
>     fl=?
>     exact=?
>     inexact=?
> I prefer the first.  The second would be more
> consistent with the rule that gave us char=?,
> string=?, char-ci=?, and string-ci=?.

I vote for rule 1.  My order of preference is 1, 1, 1.  I have four 
reasons for this:

1. The predicate seems implicit in =, <. >, <=. and >=.  The question 
mark isn't necessary.

2. The convention in rule 1 is already used by the generic arithmetic 
comparison operator names.  A question mark would be inconsistent with 
that convention, at least for predicates which apply to numeric types.

3. For identifiers which already end in punctuation, adding a question 
mark adds noise, visually, without adding information.

4. For identifiers which already end in punctuation, the question mark 
makes them slightly more difficult to type (on a QWERTY keyboard, at least).

As a counterpoint to point 2 above, the rule 1 convention is 
inconsistent with the string and char predicates, and a few others. 
However, that inconsistency already exists with the generic arithmetic 

We could eliminate the inconsistency entirely by removing the question 
mark from all such predicates: 20 R5RS string and char predicates, plus 
the three new predicates free-identifier=?, bound-identifier=?, and 
bytes=?.  The old R5RS names could be moved into the compatibility library.

Otherwise, the choice is between being consistent across names which 
apply to numeric values, or being consistent across names which contain 
alphabetic characters.  Consistency based on the semantics of the 
operation seems more important than consistency based on a superficial 
property of their names.

Finally, there's a possible benefit in having a strict rule that all 
predicate names end in a question mark.  It makes them slightly easier 
to type in the "x x -> boolean" sense.  But all Rule 1 does is add to 
the number of suffixes which can signify a predicate.  This a minor issue.

OK, I painted the shed.  Did I miss any spots?


More information about the R6RS mailing list