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

Re: The ". $" notation

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 are here. Eventually, the entire history will be moved there, including any new messages.



On 3/19/13, David A. Wheeler <dwheeler@xxxxxxxxxxxx> wrote:
> Alan Manuel Gloria:
>> There's a subtle problem with ". $" though...
>>
>> First:
>>
>> a $ b
>> ===>
>> (a b) ; as described in the rationale for SUBLIST.
>>
>> Then:
>>
>> a . $ b
>> ===>
>> (a . b)
>>
>> ???
>
> Bug, and I think fixed.  Current development version of
> "unsweeten" and the ANTLR implementation seem to work.
> The Scheme implementation now does this:
>
> $ printf 'a . $ b\n\n' | ./unsweeten
> (a b)
>
>
> Supporting ". $" does have a slight annoyance; it creates a minor
> ambiguity in the grammar (basically, like a "dangling else" clause in many
> langauges).
> I've been able to avoid those so far.  It's not a crisis, because we can
> easily make it go first, but it is an annoyance.

Err mostly I was pointing out that this is actually an inconsistency -
SUBLIST normally does not wrap a single datum after it in an extra
layer of parens, while "." essentially removes an extra layer of
parens.  So maybe ". $" notation isn't as good as I thought.

Sincerely,
AmkG