m.invoke() vs. m() vs. m#()

Rémi Forax forax at univ-mlv.fr
Sun Dec 13 07:13:11 PST 2009


Le 13/12/2009 12:25, Vladimir Kirichenko a écrit :
> Peter Levart wrote:
>
>    
>> This has the benefit of:
>> - being unambiguous (no need for special shadowing/name-space rules)
>>      
> Why be unambiguous here? For what? Just to have ability to name
> everything with the same name?
>
> Why don't we have special syntax for making unambiguous:
> * interfaces: class X interface %X
> * enums: class X{} enum $X{};
> * constructors (why not?): class X { ~X(){} }
> * final fields/variables: public static final String&CONST;
> * static methods:  C.*m*();
> * !this()
> * ^super()
>
>    

you forget + for public, _ for static, ¤ for transient.
BTW, to make fun of Perl is not fair :)

> Every of above examples could be supported with every argument against
> ambiguity shown here. Why don't we have it?  And having this things
> ambiguous we seem not have any problems with "ambiguity".
>
> Closure is a function. It's a natural to call function, any
> function(constructor, static method, this(), super()) without pointing
> out with verb "call it" or hieroglyph defining the same.
>
>    

Rémi


More information about the closures-dev mailing list