Hello Hannes,
This looks more or less how Java code will end up looking if you try to use
functions all over the place.
I think in your example you're overdoing the number of wrapped functions a
bit, though there may be cases when this is needed I guess.

Since you're now able to use MethodHandles in Java8 one can simply write
props as normal method, and lift it into a function once you need it like
that:

public static Props props2(Supplier<Props> needs) {
  return Props.create(ActorA.class, () -> new ActorA(needs));
}

Function<Supplier<Props>, Props> mkProps = ActorA::props2;


So that's one tip I can add to the discussion.


Fun fact, I've implemented a little sample library which allows you to do
currying/partial application with Java 8,
though sadly you loose type safety there (have not figured it out
completely and didn't spend much time on it):
https://github.com/ktoso/jcurry

-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe

<http://typesafe.com>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to