Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24747 > unrolled thread

Another approach to lambdas

Started byArved Sandstrom <asandstrom2@eastlink.ca>
First post2013-07-16 23:02 -0300
Last post2013-07-18 08:23 +0200
Articles 5 — 4 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Another approach to lambdas Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-07-16 23:02 -0300
    Re: Another approach to lambdas Jan Burse <janburse@fastmail.fm> - 2013-07-17 08:46 +0200
    Re: Another approach to lambdas Sebastian <news@seyweiler.dyndns.org> - 2013-07-17 23:45 +0200
      Re: Another approach to lambdas Robert Klemme <shortcutter@googlemail.com> - 2013-07-18 07:36 +0200
        Re: Another approach to lambdas Sebastian <news@seyweiler.dyndns.org> - 2013-07-18 08:23 +0200

#24747 — Another approach to lambdas

FromArved Sandstrom <asandstrom2@eastlink.ca>
Date2013-07-16 23:02 -0300
SubjectAnother approach to lambdas
Message-ID<nXmFt.10$2C2.1@fx04.iad>
http://www.infoq.com/news/2013/07/el3
-- 
When a true genius appears, you can know him by this sign:
that all the dunces are in a confederacy against him.
-- Jonathan Swift

[toc] | [next] | [standalone]


#24748

FromJan Burse <janburse@fastmail.fm>
Date2013-07-17 08:46 +0200
Message-ID<ks5ekr$vja$1@news.albasani.net>
In reply to#24747
Arved Sandstrom schrieb:
> http://www.infoq.com/news/2013/07/el3

http://www.youtube.com/watch?v=Uyx7fLXXSS4


[toc] | [prev] | [next] | [standalone]


#24750

FromSebastian <news@seyweiler.dyndns.org>
Date2013-07-17 23:45 +0200
Message-ID<ks739q$c9j$1@news.albasani.net>
In reply to#24747
Am 17.07.2013 04:02, schrieb Arved Sandstrom:
> http://www.infoq.com/news/2013/07/el3

I like the EL syntax: ((x,y) -> x+y)(4, 5)

This reads like a real functional expression, no clutter with ".apply()" 
etc. A pity this wasn't possible in Java.

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#24751

FromRobert Klemme <shortcutter@googlemail.com>
Date2013-07-18 07:36 +0200
Message-ID<b4pd7gF43taU1@mid.individual.net>
In reply to#24750
On 17.07.2013 23:45, Sebastian wrote:
> Am 17.07.2013 04:02, schrieb Arved Sandstrom:
>> http://www.infoq.com/news/2013/07/el3
>
> I like the EL syntax: ((x,y) -> x+y)(4, 5)
>
> This reads like a real functional expression, no clutter with ".apply()"
> etc. A pity this wasn't possible in Java.

It will be soon.

http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html

Cheers

	robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

[toc] | [prev] | [next] | [standalone]


#24752

FromSebastian <news@seyweiler.dyndns.org>
Date2013-07-18 08:23 +0200
Message-ID<ks81l2$tn0$1@news.albasani.net>
In reply to#24751
Am 18.07.2013 07:36, schrieb Robert Klemme:
> On 17.07.2013 23:45, Sebastian wrote:
>> Am 17.07.2013 04:02, schrieb Arved Sandstrom:
>>> http://www.infoq.com/news/2013/07/el3
>>
>> I like the EL syntax: ((x,y) -> x+y)(4, 5)
>>
>> This reads like a real functional expression, no clutter with ".apply()"
>> etc. A pity this wasn't possible in Java.
>
> It will be soon.
>
> http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html
>
> Cheers
>
> robert
>
>
Yes. I specifically meant the syntax. Java 8 lambda syntax is reasonably
OK, but I wish they would have entirely dispensed with the need to
explicitly refer to the single method in a functional interface.

Compare
sumList.apply(map(x -> sumList.apply(x), matrix)); (*)
to
sumList(map(x -> sumList(x), matrix)); (**)
where
sumList is something like
Function<List<Integer>, Integer> sumList = x -> foldr((a,b)->a+b, 0, x);

(*) is actual Java 8 syntax, but I wish it were (**). I even guess that
would have been possible with a bit of compiler magic.

-- Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web