Syntax...

Neal Gafter neal at gafter.com
Fri Nov 20 15:18:30 PST 2009


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091120/6116a178/attachment-0001.html 


More information about the closures-dev mailing list