Syntax... (errata)

Vladimir Kirichenko vladimir.kirichenko at gmail.com
Sun Nov 22 05:41:23 PST 2009


Reinier Zwitserloot wrote:
> Sure, there are plenty of syntax concerns, but in most proposals,
> there's some sort of unique symbol or keyword used to mark a closure. I
> vote that we use 'fn' or '#' and not 'fun', because that looks, frankly,
> ridiculous to me.

fn is a sorta abbreviation of fun. What is the difference?

"fun" used in ocaml, erlang.



> The problem with:
> 
> p(1, 2)

There are no problems here.

First at all there would not be backward compatibility issues because
there is no existing code that would not compile and run exactly the
same with new compiler.

The name resolution is not a problem to - a lots of languages (starting
from C, any languages with function as First-Class Object, or function
references, etc ) dealing with this stuff successfully.

Rule is simple: same id of function variable and method name - name
clash, compilation error.

So there is no way you could compile this way anything, and there is no
preexisting code that does not fit this rule.



-- 
Best Regards,
Vladimir Kirichenko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091122/e575ea2e/attachment.bin 


More information about the closures-dev mailing list