<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If you’re asking the mailing list as a whole, I certainly won’t complain. I’m not “on the team” or anything, though…<div class=""><br class=""><div class=""><div class="">
- Dave Sweeris

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 8, 2016, at 12:54, Steve Richey via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class="">

<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">Based on the response, it seems like there's some interest, but the team wouldn't get to it until after Swift 3 at the earliest. Should I open a pull request to the swift-evolution repo to allow feedback and prevent duplicate proposals?</div>
<div class=""><br class="">
</div>
<div class="">- Steve</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 11pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>&lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; on behalf of Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt;<br class="">
<span style="font-weight:bold" class="">Date: </span>Monday, February 8, 2016 at 1:13 PM<br class="">
<span style="font-weight:bold" class="">To: </span>Steve Richey &lt;<a href="mailto:srichey@gowithfloat.com" class="">srichey@gowithfloat.com</a>&gt;<br class="">
<span style="font-weight:bold" class="">Cc: </span>"<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>" &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;<br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [swift-evolution] Proposal: allow arbitrary compile-time code execution<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Feb 7, 2016, at 8:29 PM, Steve Richey via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">It is not uncommon to want to run code at build time. Xcode solves this need by allowing "Build Phases", which are often shell scripts which handle compile-time tasks.</div>
<div class=""><br class="">
</div>
<div class="">It may be beneficial to Swift developers, especially those who are not programming on platforms supported by Xcode, to handle compile-time tasks in a powerful and expressive language with which they are already familiar: Swift!</div>
<div class=""><br class="">
</div>
<div class="">In short, I propose the addition of a `#run` expression that allows the execution of code at compile time. This syntax and concept are borrowed from the programming language Jai (<a href="https://sites.google.com/site/jailanguageprimer/#TOC-Arbitrary-Compile-Time-Code-Execution" class="">https://sites.google.com/site/jailanguageprimer/#TOC-Arbitrary-Compile-Time-Code-Execution</a>)
 but the syntax fits nicely with other special expression syntax in Swift such as `#available`, `#selector`, `#file`, and so on.</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Something like this would definitely be interesting to build out. &nbsp;We should investigate it post-Swift 3 in the context of a hygienic macro system.</div>
<div class=""><br class="">
</div>
<div class="">-Chris</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</span>
</div>

_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>