Hi Giovanni,

1) The type needs to exist somewhere, and if your code doesn't care about it, 
you can accept a Source[T, _]
2) For consistency, one of the sides where chosen, and it's not that uncomon 
that you are interested in the materialized value of the Source. If you are 
interested in the materialized value of the Sink, you should add the Sink with 
runWith instead. A more complete overview is available here.

B/

On 2 March 2015 at 22:54:53, Giovanni Alberto Caporaletti (paradi...@gmail.com) 
wrote:

I'm trying to better understand the new api.  If I got it right, the new type 
parameter of the various stream components represents the type of what's 
materialized by that component when the stream is run (materialized).  E.g.: A 
Source(actorProducerProps) has the actorRef as its "materialization".

Now I have two questions:
1) In which cases could it be useful to know the materialization type of 
intermediate components? I mean, as a stream "consumer" (i.e. client, in a 
generic sense), if someone gives me a Source[T,M], I should only know that it 
produces T elements, the M type looks like implementation detail. What am I 
missing?
2) Why does .to default to Keep.left? Aren't we almost always interested in the 
materialized result of Sinks (right)? I see a lot of [T, Unit] around.



Thanks!
G
--
>>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Björn Antonsson
Typesafe Inc. – Reactive Apps on the JVM
twitter: bantonsson

JOIN US. REGISTER TODAY!
Scala
Days
March 16th-18th,
San Francisco

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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