Re: lists in enclosed expression Per Bothner 13 May 2013 22:43 UTC

On 05/13/2013 03:25 PM, John Cowan wrote:
> Per Bothner scripsit:
>
>> Another idea is to use '@' as a slice operator, since
>> it is already used as such as part of ",@" unquote-splicing:
>>
>> &foo{&[@vals]}
>
> I favor this idea.

Specially, do you like it:
- as an idea to explore?
- as a special syntax for SRFI-10[789] should define for enclosed
expression?
- as a general-purpose splicing operator?

> However, "@ vals" has to work too, because "@vals"
> is a valid R7RS-small name (though not a valid R5RS name), so R7RS-small
> programmers have to write "@ vals" in all cases.

It is?  I see '@' listed as a <special subsequent> but not a
<special initial>.

However, I just remember one complication: Kawa uses @CLASSNAME
as syntax for annotation types, though only when CLASSNAME
is a class type, so there isn't an actual conflict - it's
just a little tricky to handle:  @foo is a splice if foo is
a sequence (list or vector); it is an annotation type if foo
is a class.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/