[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how useful are collecting lists?
On 3/14/13, David A. Wheeler <dwheeler@xxxxxxxxxxxx> wrote:
> I said:
>> > Hmm. If that's a *problem*, one solution without significantly changing
>> > the existing semantics might be to allow <*...*> after ".".
> Alan Manuel Gloria <almkglor@xxxxxxxxx> 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),
Well, \\ isn't sensible because it ends the current expression so it
comes out as something like (. ), which doesn't make sense), but why
foo $ a b
(foo (a b))
foo . $ a b
(foo . (a b))
(foo a b)
Okay, so there's really no use for $ after . LOL. I can't think of a
use case for when you'd rather have a ". $" instead of just writing
the next datum directly.
> 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