chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Remove comparator type specializations for


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Remove comparator type specializations for zero and one arguments
Date: Sun, 31 May 2015 12:18:09 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Peter Bex scripsit:

> Hm, actually, I just noticed that in CHICKEN 4 this will
> *not* cause a runtime error, which is probably why we added
> the rewrites.  This is not correct according to R5RS.

Actually, either behavior is correct according to R5RS/R7RS.  It is
an error to supply too many or too few arguments to a standard
procedure, which means that users can't rely on what happens and
implementers can do what they like: report an error, extend the
behavior, or jump to Fishkill, N.Y.

There's some argument for (apply = list) to do the right thing if
list is length 0 or 1.  

Here's a quick investigation report.  Of my suite of 46 Schemes,
MIT, Gambit, Chicken, Guile, SCM, KSi, Sizzle all accept (=) and (= 1)
and return #t.  In addition, STklos, Chez, Vicare, Ypsilon, IronScheme,
JScheme, STklos, XLisp, Elk, Llava, SXM return #t to (= 1), and
FemtoLisp returns #f.

-- 
John Cowan          http://www.ccil.org/~cowan        address@hidden
"Repeat this until 'update-mounts -v' shows no updates.
You may well have to log in to particular machines, hunt down
people who still have processes running, and kill them."



reply via email to

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