<div dir="ltr">Hi,<div><br></div><div>I started another thread on @pure in swift, luckily Chris Lattner reminded me about this one. I&#39;m going to continue any discussion here so we don&#39;t fragment the conversation.</div><div><br></div><div>The other thread was a pre-proposal discussion called &quot;Proposal proposal: @pure keyword&quot;, it isn&#39;t archived so I cannot link it.</div><div><br></div><div>I&#39;ve summarised the progress so far here (it&#39;s in the proposals directory for convenience):</div><div><br></div><div><a href="https://github.com/therealbnut/swift/blob/therealbnut-pure-preproprosal/docs/proposals/PureKeyword.rst">https://github.com/therealbnut/swift/blob/therealbnut-pure-preproprosal/docs/proposals/PureKeyword.rst</a></div><div><br></div><div>If I&#39;ve missed anything or you want to update, clarify, fix typos, etc. please submit a PR :) I&#39;m trying to keep it focused on things that have little contention.</div><div><br></div><div>I&#39;ve tried to unify the ideas from both the other thread and this one into that summary. As it&#39;s not really a proposal I haven&#39;t included the excellent justifications that Jimmy initially stated, they can be added if it becomes a proposal. Please add a PR if you would like them there.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 9:08 AM, Joe Groff via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Dec 21, 2015, at 2:04 PM, Alex Popov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Slight tangent, would a guarantee of purity also allow for more Tail-Call Optimizations? A cursory glance at SO seems to point to TCO not always being applied, especially when ARC is involved.<br>
<br>
<br>
</span>I don&#39;t think any reasonable meaning for `pure` in Swift would affect the possibility of TCO. There was another thread about TCO here you might read back on; as I explained there, ARC is not a barrier to TCO, our ownership and machine-level calling conventions are. We would need to be able to use a specific calling convention for guaranteed-TCOable entry points.<br>
<br>
-Joe<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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>
</div></div></blockquote></div><br></div>