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

Re: [Scheme-reports] [wg2] in support of single-arity procedural syntax transformers



On 05/12/11 18:26, Per Bothner wrote:
> On 05/12/2011 10:03 AM, Alaric Snell-Pym wrote:
>> On 05/12/11 17:02, Per Bothner wrote:
>>
>>> This solution works pretty well in Kawa, which has good column-level
>>> diagnostics.  There are some problems: You can't give a precise
>>> position to a symbol in the cdr of a dotted pair - but that is a minor
>>> problem since Scheme doesn't allow dotted pairs in non-quoted expressions.
>>
>> O RLY?
>>
>> Is (lambda (a b c . rest) ...) not legal?
>
> Well, yes, a lambda is an expression, so to be nit-pickingly
> correct I should probably have written "applications" instead
> of "expressions".
>
> My point stands: Associating line/column information with
> pairs only isn't perfect but it works quite well in practice.

Ok, sorry, didn't mean to nit-pick - the issue, though, is that dotted
pairs are valid in source code. A scheme implementation might (read) or
(read-syntax) a lambda expression that has (a b c . 2) as the args list,
and then want to moan about the 2 being invalid syntax, so there's still
a motivation to want to associate a position with the cdr of a dotted
pair, I reckon!

ABS

--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports