<p dir="auto">Instead, it returns a tuple type (Port,Chan), which is inconsistent with other Type::new() does.</p>
<p dir="auto">Rename to PortAndChan::new() ?  or Chan::new_port_and_chan()? or something other should be change or refactor.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexcrichton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexcrichton">@alexcrichton</a></p>
<p dir="auto">The current <code class="notranslate">Chan::new() -&gt; (Port, Chan)</code> is confusing because <code class="notranslate">new</code> returns a tuple instead of a new object, 'port' and 'chan' are not intuitive, and the name 'chan' is reused for two purposes (the sender and the total channel).</p>
<p dir="auto">Some proposed alternatives:</p>
<ul dir="auto">
<li><code class="notranslate">Chan::open() -&gt; (Source, Sink)</code></li>
<li><code class="notranslate">Chan::new() -&gt; (Source, Sink)</code></li>
<li><code class="notranslate">Chan::new() -&gt; (Sender, Receiver)</code></li>
<li><code class="notranslate">Chan::new() -&gt; (Source, Drain)</code></li>
<li><code class="notranslate">pipe() -&gt; (Port, Chan)</code></li>
</ul>
<p dir="auto">Also need to consider whether sender or receiver comes first in the tuple.</p>
<p dir="auto">Nominating.</p>
<p dir="auto">Discussion: <a href="https://mail.mozilla.org/pipermail/rust-dev/2014-January/007928.html" rel="nofollow">https://mail.mozilla.org/pipermail/rust-dev/2014-January/007928.html</a></p>