<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It makes some sense:</div><div class=""><br class=""></div>- Each process has its own Input/Output/Error streams.<div class="">- Processes are piped through their streams.</div><div class="">- C# has `StandardError`, `StandardInput`, `StandardOutput` properties on the `Process` class.</div><div class=""><br class=""></div><div class="">On the other hand:</div><div class=""><br class=""></div><div class="">- Java has them defined on `System`</div><div class="">- Python is very similar to Java `sys.stdout`</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 11 Jul 2016, at 22:10, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Sorry, I don't really see how these are related to "process". Can you explain?<br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Jul 11, 2016 at 15:08 Zach Waldowski via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u class=""></u>




<div class=""><div style="font-family:Arial" class="">`Process` might be a good place for namespacing these. You'll also note that `print` can take an OutputStream to make this even more idiomatic. Straw man example at&nbsp;<a href="https://gist.github.com/zwaldowski/4ed2fd48da2af3193b0cbd3ec1883c9d" target="_blank" class="">https://gist.github.com/zwaldowski/4ed2fd48da2af3193b0cbd3ec1883c9d</a>.<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div class=""><div class=""><span style="font-family:arial,sans-serif,sans-serif" class="">Cheers!</span><span style="font-family:arial,sans-serif,sans-serif" class=""></span><br class=""></div>
<div class=""><span style="font-family:arial,sans-serif,sans-serif" class="">&nbsp; Zachary Waldowski</span><span style="font-family:arial,sans-serif,sans-serif" class=""></span><br class=""></div>
<div class=""><span style="font-family:arial,sans-serif,sans-serif" class="">&nbsp;&nbsp;</span><a href="mailto:zach@waldowski.me" target="_blank" class=""><span style="font-family:arial,sans-serif,sans-serif" class="">zach@waldowski.me</span></a><br class=""></div>
</div></div><div class="">
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
<div class="">On Mon, Jul 11, 2016, at 12:24 PM, Erica Sadun via swift-evolution wrote:<br class=""></div>
<blockquote type="cite" class=""><div style="font-family:Arial" class="">Just throwing this here. Unfortunately `Stream` is already taken (and tied to Foundation).<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:16px;line-height:normal;font-family:Menlo" class=""><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">struct</span><span class=""> StdStream {</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">struct</span><span class=""> StderrStream: </span><span style="color:rgb(112,61,170)" class="">OutputStream</span><span class=""> {</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">func</span><span class=""> write(</span><span style="color:rgb(187,44,162)" class="">_</span><span class=""> string: </span><span style="color:rgb(112,61,170)" class="">String</span><span class="">) { </span><span style="color:rgb(61,29,129)" class="">fputs</span><span class="">(string, Darwin.</span><span style="color:rgb(112,61,170)" class="">stderr</span><span class="">) }</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class="">&nbsp; &nbsp; }</span><br class=""></div><div style="margin: 0px; line-height: normal; min-height: 19px;" class=""><span class="">&nbsp;&nbsp; &nbsp;</span><br class=""></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">struct</span><span class=""> StdoutStream: </span><span style="color:rgb(112,61,170)" class="">OutputStream</span><span class=""> {</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">func</span><span class=""> write(</span><span style="color:rgb(187,44,162)" class="">_</span><span class=""> string: </span><span style="color:rgb(112,61,170)" class="">String</span><span class="">) { </span><span style="color:rgb(61,29,129)" class="">fputs</span><span class="">(string, Darwin.</span><span style="color:rgb(112,61,170)" class="">stdout</span><span class="">) }</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class="">&nbsp; &nbsp; }</span><br class=""></div><div style="margin: 0px; line-height: normal; min-height: 19px;" class=""><span class="">&nbsp;&nbsp; &nbsp;</span><br class=""></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">static</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">var</span><span class=""> err = </span><span style="color:rgb(79,129,135)" class="">StderrStream</span><span class="">()</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class=""> </span><span style="color:rgb(187,44,162)" class="">public</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">static</span><span class=""> </span><span style="color:rgb(187,44,162)" class="">var</span><span class=""> out = </span><span style="color:rgb(79,129,135)" class="">StdoutStream</span><span class="">()</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal" class=""><span class="">}</span><br class=""></div>
</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:16px;line-height:normal;font-family:Menlo" class="">&nbsp;</div>
<div class="">So in use, it would look something like&nbsp;<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:16px;line-height:normal;font-family:Menlo" class=""><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal;color:rgb(79,129,135)" class=""><span class="">str</span><span style="" class="">.</span><span style="color:rgb(61,29,129)" class="">write</span><span style="" class="">(to: &amp;</span><span class="">StdStream</span><span style="" class="">.</span><span class="">out</span><span style="" class="">)</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:normal;color:rgb(79,129,135)" class=""><span class="">str</span><span style="" class="">.</span><span style="color:rgb(61,29,129)" class="">write</span><span style="" class="">(to: &amp;</span><span class="">StdStream</span><span style="" class="">.</span><span class="">err</span><span style="" class="">)</span><br class=""></div>
<div class="">&nbsp;</div>
</div>
</div>
<div class="">I also considered DarwinStream (seemed too on the nose), UnixStream, Streamfd, BSDStream, etc. Didn't like any of them.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">-- E, have paintbrush will bikeshed<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div style="font-family:Arial" class="">&nbsp;</div>
<blockquote type="cite" class=""><div class="">On Jul 11, 2016, at 12:58 PM, Saagar Jha via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div class=""><div class=""><div style="font-family:Arial" class="">Thanks, I’ll write it up.<br class=""></div>
<blockquote type="cite" class=""><div style="font-family:Arial" class="">On Jul 11, 2016, at 11:20, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">on Sun Jul 10 2016, Saagar Jha &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<blockquote type="cite" class=""><div style="font-family:Arial" class="">What is the process for smaller issues like these? I’m guessing that<br class=""></div>
<div style="font-family:Arial" class="">this doesn’t need a proposal; where should it go? On <a href="http://bugs.swift.org/" target="_blank" class="">bugs.swift.org</a><br class=""></div>
<div style="font-family:Arial" class="">&lt;<a href="http://bugs.swift.org/" target="_blank" class="">http://bugs.swift.org/</a>&gt;?<br class=""></div>
</blockquote><div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">If it adds an API, it needs a proposal.&nbsp; Doesn't necessarily have to be<br class=""></div>
<div style="font-family:Arial" class="">a big proposal, and the review period can be short, but we don't add<br class=""></div>
<div style="font-family:Arial" class="">APIs without the evolution process.<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">Thanks,<br class=""></div>
<div style="font-family:Arial" class="">Dave<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">-- <br class=""></div>
<div style="font-family:Arial" class="">Dave<br class=""></div>
<div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">_______________________________________________<br class=""></div>
<div style="font-family:Arial" class="">swift-evolution mailing list<br class=""></div>
<div style="font-family:Arial" class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""></div>
<div style="font-family:Arial" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div>
</blockquote><div style="font-family:Arial" class="">&nbsp;</div>
<div style="font-family:Arial" class="">_______________________________________________<br class=""></div>
<div style="font-family:Arial" class="">swift-evolution mailing list<br class=""></div>
<div style="font-family:Arial" class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""></div>
<div style="font-family:Arial" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div>
</div>
</div>
</blockquote></div>
</div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">swift-evolution mailing list<br class=""></div>
<div class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""></div>
<div class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div>
</blockquote><div style="font-family:Arial" class="">&nbsp;</div>
</div>

_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>