Syntax... (errata)
Reinier Zwitserloot
reinier at zwitserloot.com
Sun Nov 22 07:56:45 PST 2009
As I said, personal taste. I think 'fun' looks 'funny', mostly because of
the 'fun' being an english word and all. Also, at least in mathematical
circles, I see a lot more 'fn' than fun. On a perhaps more pragmatic note,
java has absolutely no shortened keywords right now. All keywords are
written out in full.
So, we have 'synchronized', and not 'sync'. We have 'protected' and not
'prot', 'extends' and 'implements' instead of 'ext' or 'impl' or '::' or
some other symbol.
So, if it is to be a keyword instead of a symbol, then 'function' seems to
be more in line with existing java keywords than 'fun'.
--Reinier Zwitserloot
On Sun, Nov 22, 2009 at 2:41 PM, Vladimir Kirichenko <
vladimir.kirichenko at gmail.com> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091122/03a5e51b/attachment.html
More information about the closures-dev
mailing list