Project Lambda: Java Language Specification draft 0.1.5
Olivier Allouch
oallouch at free.fr
Tue Feb 16 08:26:58 PST 2010
Hi,
I also think the foo.() notation is the worst of 3.
I like the "function" notation: foo() and wouldn't mind the last one:
foo.invoke()
I like everything "function" actually.
Le 16/02/2010 16:32, Paul Benedict a écrit :
> To your definition of the PLS, I don't think there is an official
> definition. However, exempting the native types of Java, everything is
> an object (even methods). To have over a decade of Java invoking
> methods on objects, and then suddenly introducing an unnamed method --
> and not requiring a method name -- can't thwart objections under the
> tarp of "it's a new language feature".
>
> On Tue, Feb 16, 2010 at 6:55 AM, Reinier Zwitserloot
> <reinier at zwitserloot.com> wrote:
>
>> That's not the principle of least surprise. The PLS means: If a significant
>> chunk of those people using it think a certain library call or construct
>> does X, and believe this is sufficiently logic to not immediately dive for
>> the documentation, but this call or construct actually does Y, that's a
>> violation of PLS. That's _clearly_ not happening here. The only possible
>> expectation here is that "foo.()" is simply invalid syntax, but this
>> argument feels like weak tea to me: You can make that argument against just
>> about every new language feature.
>>
>
More information about the lambda-dev
mailing list