bug-guile
[Top][All Lists]
Advanced

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

bug#17296: Uh, wrong?


From: Mark H Weaver
Subject: bug#17296: Uh, wrong?
Date: Tue, 03 Jun 2014 22:55:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

David Kastrup <address@hidden> writes:
> So the behavior for length+ on a dotted list is strictly unspecified.
> It is not even stated "it is an error".

Actually, it is.  At the end of the section that defines the "types"
such a "clist" and "flist", it states:

  It is an error to pass a circular or dotted list to a procedure not
  defined to accept such an argument.

While it is true that we are not required to signal an error, I'm wary
extending 'length+' in this way.  It also effectively extends 'map' and
'for-each' to support things like (map + '() 'foo), and thus potentially
affects many other procedures both inside and outside of Guile that use
'map' and 'for-each'.  Once we've done this, users are likely to grow
dependent on it and we can never go back.

> At any rate, what I am getting at is that I was going to submit the
> following patch as a part of a series fixing other bugs, bugs that I
> need a working "get the length of a dotted list" operator for.  We don't
> have any such operator in GUILE, and that's awkward.

It might be helpful to add such a procedure, but I don't think 'length+'
should be it.

   Regards,
     Mark





reply via email to

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