GNU bug report logs -
#17296
[PATCH] SRFI-1 'length+' raises an error unless passed a proper or circular list
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Fri, 18 Apr 2014 19:29:02 UTC
Severity: normal
Tags: patch
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 17296 <at> debbugs.gnu.org (full text, mbox):
Mark H Weaver <mhw <at> netris.org> writes:
> The fact that the SRFI-1 reference implementation of 'length+' is lax
> very nearly swayed me over to your position, but there's a problem:
> Guile's 'length+' has (always?) returned #f for dotted lists. It would
> be dangerous to silently change the behavior of this case from one
> non-error to another non-error. Programs could start silently
> misbehaving without any clue that anything went wrong.
BTW, I looked at the discussion archive for SRFI-1 looking for wisdom
about whether we should eventually make 'length+' lax or not. I
discovered that Olin Shivers (SRFI-1 author) was in favor of making
essentially all SRFI-1 procedures tolerant of dotted lists, a position
he expressed concisely as "everything is a list", since non-null
non-pairs such as "foo", 2, and even? are naturally regarded as dotted
lists of length 0.
It turns out that he was overwhelming overruled on this. Some of the
most respected people in the Scheme world agreed it was a bad idea, and
in fact not a single other participant agreed with him.
So he grudgingly changed the spec to reflect the consensus, but he left
his reference implementation as he preferred.
A good summary of the reasons against Olin's preference was given here:
http://srfi.schemers.org/srfi-1/mail-archive/msg00052.html
If you're curious, here's a threaded index of the entire discussion:
http://srfi.schemers.org/srfi-1/mail-archive/threads.html
Search for "Everything is a list" for Olin's position, and the threads
following "Re: SRFI-1 round 3 discussion", where Olin tried to defend
his position, then tried to sell a compromise, and finally gave in
completely.
Regards,
Mark
This bug report was last modified 10 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.