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