Yeah, agree with Patrik here. It's mostly for `Future[Done]` and situations like that, void/Unit is still fine in normal return values.
-- Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 13:35:02, Patrik Nordwall (patrik.nordw...@gmail.com) wrote: On Wed, Feb 24, 2016 at 1:23 PM, rklaehn <rkla...@gmail.com> wrote: Hi Konrad, So, if it wasn't for backward compatibility, the return type of tell would be akka.NotUsed, to signal that successful return does not tell you anything about successful processing of the message (akka.Done would certainly be wrong)? That would be to take it one step to far, I would say. Ordinary methods should still be declared with void (java) or Unit (scala) return types. Done and NotUsed are mostly interesting when the return value is not immediate, such as in a CompletionStage (java), Future (scala), or stream materialized value. Cheers, Rüdiger On Wednesday, February 24, 2016 at 11:43:33 AM UTC+1, Konrad Malawski wrote: Hey Rüdiger, yeah those can definitely be used in all kinds of APIs. The reason we have them mostly in Streams for now is because we could not break compatibility in akka-actor for example. The types are intended to be simply more informative than plain `Unit`, so wherever that's needed feel free to use them :-) -- Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 11:41:57, rklaehn (rkl...@gmail.com) wrote: Hi all, given the prominent position of akka.Done and akka.NotUsed: are these only meant to be used within akka streams, or also elsewhere? I am currently trying to introduce futures into a codebase with a lot of blocking, and it sure would be helpful to distinguish between methods returning Unit where successful return signals successful completion, and methods where successful return means nothing (e.g. because it is sending to some actor inside the method using !). Would this be a valid use case for using Done and NotUsed? Cheers, Rüdiger -- >>>>>>>>>> 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+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Lightbend - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.