<div dir="ltr">I think this is what you mean by parallel forEach, I have just expanded the wording below to be clearer (for myself primarily).<div><br></div><div>The Java equivalent of a `LazySequenceProtocol` has a parallel method that returns a parallel lazy sequence, so that operations like map, reduce, filter, and forEach all run in parallel. I have used this a lot to speed up code and it would be another great addition.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"> -- Howard.<br></div></div>
<br><div class="gmail_quote">On 29 August 2017 at 16:14, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@nondot.org" target="_blank">clattner@nondot.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Aug 28, 2017, at 6:56 PM, Howard Lovatt via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br class="m_3225312369840226115Apple-interchange-newline"><div><div dir="ltr">Many of the currently popular server side frameworks are switching to Reactive Streams:<div><br></div><div> <a href="http://en.wikipedia.org/wiki/Reactive_Streams#Adoption" target="_blank">http://en.wikipedia.org/wiki/<wbr>Reactive_Streams#Adoption</a></div><div><br></div><div>for their underlying communication, including Akka. Reactive Streams are also to become builtin to Java, as the Flow class, in version 9.</div><div><br></div><div>Would it be wise if Swift 5 also builtin Reactive Stream protocols and built its Actor implementation etc. on top of this protocol?<br></div></div></div></blockquote><div><br></div></span><div>In MHO, yes, it would be great to build a reactive stream abstraction as well. I agree with you that this is an effectively “obvious” part of the eventual model, and that we will almost certainly end up building it. It would also make sense to have foreach over an async sequence be itself implicitly async. I haven’t sketched that out, but it seems like a few straight-forward steps beyond what is in the manifesto doc.</div><div><br></div><div>I’ve added a mention of these to the doc, thanks!</div><div><a href="https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9f782#further-extensions" target="_blank">https://gist.github.com/<wbr>lattner/<wbr>31ed37682ef1576b16bca1432ea9f7<wbr>82#further-extensions</a></div><div><br></div><div>-Chris</div><div><br></div><br><blockquote type="cite"><div><span class=""><div dir="ltr"><div><div class="gmail_extra"><br clear="all"><div><div class="m_3225312369840226115gmail_signature"> -- Howard.<br></div></div><div class="m_3225312369840226115gmail_signature"><br></div><div class="m_3225312369840226115gmail_signature">More info on Reactive streams:</div><div class="m_3225312369840226115gmail_signature"><br></div><div class="m_3225312369840226115gmail_signature"> <a href="https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.1/README.md#specification" target="_blank">https://github.com/reactive-<wbr>streams/reactive-streams-jvm/<wbr>blob/v1.0.1/README.md#<wbr>specification</a></div><div class="m_3225312369840226115gmail_signature"><br></div><div class="m_3225312369840226115gmail_signature"> <a href="http://bryangilbert.com/post/code/scala/akka-reactive-streams/" target="_blank">http://bryangilbert.com/<wbr>post/code/scala/akka-reactive-<wbr>streams/</a></div><div class="m_3225312369840226115gmail_signature"><br></div>
<div class="gmail_quote"><br></div></div></div></div></span>
______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br></div></blockquote></div><br></div></blockquote></div><br></div>