[swift-evolution] General take on "special" code in Swift
tjw at omnigroup.com
Fri Dec 4 01:21:46 CST 2015
First off, thanks for all the hard work in putting together an in-depth release and open community infrastructure!
Looking through the Swift sources briefly, I’m noticing various constructs that aren’t documented, idiomatic Swift, or even Swift at all. This isn’t super surprising for various mostly obvious reasons. But, one particular example that caught my attention is in swift/util/gyb.py ("GYB: Generate Your Boilerplate”), and all the .gyb files scattered around.
One of the various Apple Swift tutorial/reference PDFs had the canonical maligning of the C preprocessor (warranted, but yet it is a powerful and useful tool), and yet here is the Swift standard library using a preprocessor of another sort.
For this specific case, I could ask for some magical hygienic macro support, with full debugger support, autocompletion, and puppies (which would be great!), but the more general question is whether the Swift team feels like this dichotomy is OK, or whether it just (a ton of) work that is left to do? Should it be the case that the standard library, Foundation, testing frameworks, and such are almost entirely idiomatic Swift code (even if they are using advanced features)?
Thanks again — it’s been an exciting day for Swift!
More information about the swift-evolution