<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 2:23 PM, Puyan Lotfi <span dir="ltr"><<a href="mailto:plotfi@apple.com" target="_blank" class="cremed">plotfi@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The reason why I think this option is good is to avoid allocating memory twice and avoid calling malloc when the strings are already going to persist (despite the small performance impact).</blockquote>
<div><br></div><div>The performance impact is not just small, it is unmeasurable small. It isn't worth the cost of this email discussion or writing the second interface to get this optimization. This is all really premature optimization for a case that simply doesn't matter.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I understand your reasons for not wanting a buggy interface that clients would use and have all kinds of unexpected use-after-free bugs, but I’m not proposing this as a default. </blockquote>
</div><br></div><div class="gmail_extra">It doesn't matter what is the default. If we have a bug-prone interface, someone will call it, and will write a bug. I don't understand why you would want to spend your time including such an interface when it will provide no observable benefit and will widen the interface, potentially introducing bugs.</div>
</div>