how useful are collecting lists? David Vanderson (12 Mar 2013 04:32 UTC)
(missing)
Re: how useful are collecting lists? David Vanderson (13 Mar 2013 01:59 UTC)
Re: how useful are collecting lists? David A. Wheeler (13 Mar 2013 02:51 UTC)
Re: how useful are collecting lists? Alan Manuel Gloria (13 Mar 2013 06:54 UTC)
Re: how useful are collecting lists? David A. Wheeler (13 Mar 2013 23:36 UTC)
Re: how useful are collecting lists? Alan Manuel Gloria (14 Mar 2013 00:48 UTC)
Re: how useful are collecting lists? David A. Wheeler (13 Mar 2013 23:57 UTC)
Re: how useful are collecting lists? David Vanderson (14 Mar 2013 01:15 UTC)

Re: how useful are collecting lists? David A. Wheeler 13 Mar 2013 23:36 UTC

I said:
> > Hmm. If that's a *problem*, one solution without significantly changing
> > the existing semantics might be to allow <*...*> after ".".

Alan Manuel Gloria <xxxxxx@gmail.com> wrote:

> Ara ara, I thought this was *already* allowed...

Actually, they weren't.  I was trying to be picky about what's allowed after "." (e.g., I don't think "$" and "\\" are sensible), and obviously was *too* picky.  You're absolutely right, that should be permitted.

So this is an important tip, we need to allow this case. I've changed the BNF and Scheme implementation so that a collecting list is legal after the dot in "rest".  Thus, this is now legal:
define x . <*
! define y 5

! define z 6
*>

I haven't modified "head", so if "." is the first atom on a line, a collecting list currently can't follow.  I can't figure out why you'd want to do that, I'd expect a user to just use a collecting list in that case.

So we already have an important comment (from David Vanderson) that's pointed out a problem, and I've posted a possible solution (one that I hope others will agree is sensible).  Excellent!  Seems to me that's why we have a SRFI process...

--- David A. Wheeler