[swift-evolution] Why aren't source to source transformations part of the Swift language standard?

Amir Michail a.michail at me.com
Tue Dec 29 12:07:41 CST 2015


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).

You could have special directives for source to source transformations such as:

@extractMethodBegin
… swift code ...
@extractMethodEnd

@indentBegin
… swift code ...
@indentEnd

@commitCommentFragmentBegin
… swift code ...
@commitCommentFragmentEnd

etc…

Why encourage reinventing the wheel by pushing source to source transformations to tools of varying quality and completeness?


More information about the swift-evolution mailing list