<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 29, 2015, at 2:34 PM, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I would not recommend phrasing these proposals as "Why doesn't Swift already support X?" when you are proposing a new feature.<div class=""><br class=""></div><div class="">Instead, I'd like to see much more fleshed out examples of what you'd propose to change, and how it would help Swift developers. From the small amount of information you've given here, I can't understand what you're trying to do.</div></div></div></blockquote><div><br class=""></div><div>Xcode is not open source and it is unlikely that Swift source to source transformations that will be part of Xcode in the future (e.g., extract method) will be open source.</div><div><br class=""></div><div>What I propose would be a way to embed source to source transformations into Swift using directives in the language. As the language is open source, so will be the transformations.</div><div><br class=""></div><div>Note also that the compiler already has the information required for source to source transformations and so it makes sense to embed these transformations in the compiler itself.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Jacob</div></div></div></div>
<br class=""><div class="gmail_quote">On Tue, Dec 29, 2015 at 10:07 AM, Amir Michail via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Source to source transformations are part of a developer’s job, don’t need a GUI, and can be done more easily and accurately by the Swift compiler. Moreover, the compiler could be made interactive taking in extra information from the developer as required during the "compile" (again without requiring a GUI).<br class="">
<br class="">
You could have special directives for source to source transformations such as:<br class="">
<br class="">
@extractMethodBegin<br class="">
… swift code ...<br class="">
@extractMethodEnd<br class="">
<br class="">
@indentBegin<br class="">
… swift code ...<br class="">
@indentEnd<br class="">
<br class="">
@commitCommentFragmentBegin<br class="">
… swift code ...<br class="">
@commitCommentFragmentEnd<br class="">
<br class="">
etc…<br class="">
<br class="">
Why encourage reinventing the wheel by pushing source to source transformations to tools of varying quality and completeness?<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div><br class=""></div></div></div></div>
</div></blockquote></div><br class=""></body></html>