Lambda syntax puzzler
Howard Lovatt
howard.lovatt at gmail.com
Thu Oct 17 12:20:59 PDT 2013
However the discussion wasn't really resolved, it just petered out. I still
think it would be a good idea to make inferred parameters final and if
people want mutable they have to declare the type. Because mutable that is
not a mistake is a very rare case and therefore rarely used syntax is a
good fit for this.
-- Howard.
On Thursday, October 17, 2013, Remi Forax wrote:
> On 10/17/2013 08:53 AM, Stuart Marks wrote:
> >
> >
> > 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
>
>
> doh,
> I've totally forgotten that discussion too.
>
> Rémi
>
> >
> >
> >
> >>
> >> That's said, it's not a big issue
> >>
> >> cheers,
> >> Rémi
> >>
> >>>
> >>> -----Original Message-----
> >>> From: lambda-dev-bounces at openjdk.java.net <javascript:;>
> >>> [mailto:lambda-dev-bounces at openjdk.java.net <javascript:;>] On Behalf
> Of Zhong Yu
> >>> Sent: Wednesday, October 16, 2013 2:31 PM
> >>> To: Stuart Marks
> >>> Cc: lambda-dev at openjdk.java.net <javascript:;>
> >>> Subject: Re: Lambda syntax puzzler
> >>>
> >>> On Tue, Oct 15, 2013 at 1:34 PM, Stuart Marks
> >>> <stuart.marks at oracle.com <javascript:;>> 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<javascript:;>
> >
> >>>>> 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
> >>>
> >>>
> >>
> >>
>
>
>
--
-- Howard.
More information about the lambda-dev
mailing list