Lambda syntax puzzler
Stuart Marks
stuart.marks at oracle.com
Wed Oct 16 23:53:14 PDT 2013
On 10/16/13 7:05 AM, Remi Forax wrote:
> With the proposal of Stuart, you need to introduce a new local variable
> (array, start, end) -> {
> for(int i = start; i < end; i++) {
> ... array[i] ...
> }
> }
Oh crap, I shouldn't have opened my big mouth.
My statement about making formal parameters implicitly final wasn't a proposal,
nor did I intend to reopen this conversation. It was a flip comment based on a
stylistic pet peeve of mine.
Turns out this was discussed extensively last year on lambda-dev in a thread
started by Venkat S. [1] I either missed this or had forgotten about it. There
were a fair number of people who thought it was reasonable, but there were
questions about how beneficial it would be, plus there was the usual fractal
graph of related and dependent issues. I suggest people go reread that thread.
Sorry for the noise.
s'marks
[1] http://mail.openjdk.java.net/pipermail/lambda-dev/2012-December/007280.html
>
> That's said, it's not a big issue
>
> cheers,
> Rémi
>
>>
>> -----Original Message-----
>> From: lambda-dev-bounces at openjdk.java.net [mailto:lambda-dev-bounces at openjdk.java.net] On Behalf Of Zhong Yu
>> Sent: Wednesday, October 16, 2013 2:31 PM
>> To: Stuart Marks
>> Cc: lambda-dev at openjdk.java.net
>> Subject: Re: Lambda syntax puzzler
>>
>> On Tue, Oct 15, 2013 at 1:34 PM, Stuart Marks <stuart.marks at oracle.com> wrote:
>>> Either that, or make lambda formal parameters implicitly final. I've
>>> always
>> That is apparently a good idea with no objections; how come EG isn't adopting it? what are the concerns?
>>
>>> hated code that mutated its parameters anyway.
>>>
>>> s'marks
>>>
>>> On 10/12/13 6:50 AM, Samir Talwar wrote:
>>>> :-D
>>>>
>>>> Now that traditional C-style `for` loops are a thing of the past, I
>>>> think we should expunge the increment and decrement operators from the language.
>>>> Python had the right idea.
>>>>
>>>> — Samir.
>>>>
>>>>
>>>> On Sat, Oct 12, 2013 at 1:27 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>>>>
>>>>> I'm sure that people of this list will be able to see the beauty of
>>>>> the following code produced by one of my students.
>>>>> IntPredicate p = i -> i --> 0;
>>>>>
>>>>> Rémi
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>
>> Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Dr. Wolfram Jost, Arnd Zinnhardt; - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Andreas Bereczky - http://www.softwareag.com
>>
>>
>
>
More information about the lambda-dev
mailing list