<div dir="ltr"><div>In that case I think the discussion is kind of moot, scripts are fundamentally different than apps, being terse is important and almost always you want to block.</div><div><br></div><div>If better scripting support is a non-goal for Foundation then `Process` is mostly fine as it is. My only wish would be to somehow make it easier to read and write `Data` to stdin/stdout/stderr.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 28, 2017 at 11:30 PM, Tony Parker <span dir="ltr">&lt;<a href="mailto:anthony.parker@apple.com" target="_blank">anthony.parker@apple.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Of course, Foundation API has no way of distinguishing if the caller is considered a script or not.<div><br></div><div>If the API is a bad idea for other kinds of apps then we simply wouldn’t add it. So, I think this proposed convenience API needs to consider all of the varied clients of Foundation.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">- Tony</font></span><div><div class="h5"><br><div><div><br><blockquote type="cite"><div>On Nov 28, 2017, at 12:24 PM, Brent Royal-Gordon &lt;<a href="mailto:brent@architechies.com" target="_blank">brent@architechies.com</a>&gt; wrote:</div><br class="m_-3332190188863513248Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space"><div><blockquote type="cite"><div>On Nov 28, 2017, at 8:00 AM, Tony Parker &lt;<a href="mailto:anthony.parker@apple.com" target="_blank">anthony.parker@apple.com</a>&gt; wrote:</div><br class="m_-3332190188863513248Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Why does it imply a run loop rather than one of many multithreading possibilities (dispatch queue, starting one more thread, etc)? And even if it did use run loops, why is that a problem?</span></div></blockquote></div><div><br></div><div>The problem is simply that we&#39;re discussing using this feature in Swift *scripts*. Swift scripts don&#39;t typically invoke `RunLoop.run()` or `dispatch_main()`, and without changing the way they generate main() functions to intrinsically do so (and then schedule main.swift&#39;s body on the main runloop/queue), I don&#39;t see a good way for it to do so. So an async API would be inconvenient to use from a Swift script.</div><br><div>
<span class="m_-3332190188863513248Apple-style-span" style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div><div style="font-size:12px">-- </div><div style="font-size:12px">Brent Royal-Gordon</div><div style="font-size:12px">Architechies</div></div></span>

</div>
<br></div></div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div>