<div><div dir="auto">Not quite understanding your concern, perhaps you could elaborate. In particular:</div><div dir="auto"><br></div><div dir="auto">  1. The names I proposed were on(next:) and on(error:) so there is no confusion since next and error are still part of the name. I just moved them inside the brackets like commonly done in Swift. </div><div dir="auto"><br></div><div dir="auto">  2. Neither on(next:) nor on(error:) accept a closure, they take values. </div><div dir="auto"><br></div><div dir="auto">  3. You don’t manually call either on(next:) or on(error:), the only method you interact with is subscribe. Which in my library I have overloaded with ~~&gt; so that you don’t call methods at all on reactive stream objects. See README for <a href="https://github.com/hlovatt/Concurrency-Utilities">https://github.com/hlovatt/Concurrency-Utilities</a>. </div><div dir="auto"><br></div><div dir="auto"><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;background-color:rgb(255,255,255)">Hello World using this library is:</p><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:16px;word-wrap:normal;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal">let helloWorldPublisher = ForEachPublisher(sequence: &quot;Hello, world!&quot;.characters)
let helloWorldSubscriber = ReduceSubscriberFuture(into: &quot;&quot;) { (result: inout String, next: Character) in
    result.append(next)
}
var helloWorldResult = &quot;Failed!&quot; // Default value for failure, timeout, etc.
helloWorldPublisher ~~&gt; helloWorldSubscriber ~~&gt;? helloWorldResult
</code></pre><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;background-color:rgb(255,255,255)">Note how the arguments to <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">ForEachProducer</code> and <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">ReduceSubscriberFuture</code> mimic those to similarly named methods in Swifts <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Sequence</code> protocol, how <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Subscriber</code>&#39;s <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">~~&gt;</code> is evocative of the process that is occurring, and how <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Future</code>&#39;s <code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">~~&gt;?</code> looks natural and controls execution and error reporting. Fire is another part of the library, see readme.</p></div><div dir="auto"><br></div><div dir="auto"><br></div><br><div class="gmail_quote"><div>On Sun, 24 Sep 2017 at 12:25 am, Dave DeLong via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div>On Sep 23, 2017, at 1:24 AM, Georgios Moschovitis via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-7899702706997231275Apple-interchange-newline"><div><div>Copied from the corresponding Github issue, I would like to hear opinions from the broader community on this:<br><br>I am wondering if the correct &#39;translation&#39; to Swift of:<br><br>```<br>onNext()<br>onError()<br>```<br><br>is really:<br><br>```<br>on(next:)<br>on(error:)<br>```<br></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div>I’ve played around with reactive streams, and one of the main issues with this naming convention is that it really confuses the compiler when you try to use trailing closure syntax:</div><div><br></div><div><font face="Menlo">aStream.on { nextOrError in</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">}</font></div><div><br></div><div>The compiler has a really hard time inferring what the type of <font face="Menlo">nextOrError</font> is without explicitly typing the parameter or not using trailing closure syntax.</div><div><br></div><div>Using <font face="Menlo">.onNext { … }</font> or <font face="Menlo">.onError { … }</font> bypasses this problem entirely.</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><br></div><div>Dave</div><div><br></div><br></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><blockquote type="cite"><div><div>maybe something closer to Foundation&#39;s naming conventions would be:<br><br>```<br>didReceive(next:) or didReceive(value:)<br>didReceive(error:)<br>```<br><br>-g.<br><br>_______________________________________________<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/mailman/listinfo/swift-evolution</a><br></div></div></blockquote></div></div>_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature">-- Howard.</div>