Syntax...
Paul Benedict
pbenedict at apache.org
Fri Nov 20 16:33:21 PST 2009
You could use # and ## . Is that palatable?
On Fri, Nov 20, 2009 at 5:18 PM, Neal Gafter <neal at gafter.com> wrote:
> On Fri, Nov 20, 2009 at 3:21 PM, Rémi Forax <forax at univ-mlv.fr> wrote:
>>
>> Sorry, I was not clear.
>> I am able to parse the current syntax and any parser will be able too,
>> but I am not sure everyone will be able to do the same.
>>
>> One thing I have observed when teaching C is that the first problem when
>> explaining pointer was the C syntax.
>> This syntax use * when you declare a pointer type and * when you want to
>> dereference
>> a pointer variable. This syntax create unnecessary confusion.
>>
>> If the syntax of closure use a symbol for lambda and another for function
>> type,
>> I will be happy.
>
> So you would prefer, for example, to use # for one of them and ^ for the
> other? If so, I think it must be # for the lambda (because method
> references make closures, too) and ^ for the function type.
>
> ^int(int) plusOne = #(int x)x+1;
>
> I wonder if a context-sensitive keyword would work?
>
More information about the closures-dev
mailing list