[swift-users] What are .swift.gyb files?
J. Cheyo Jimenez
cheyo at masters3d.com
Tue Dec 8 08:54:20 CST 2015
Ah thank you. I did notice some Python syntax in there. Very cool!
On Tuesday, December 8, 2015, Brent Royal-Gordon <brent at architechies.com>
wrote:
> > I'm reading the stdlib source code and I see .gyb files. What are those
> files for?
>
> gyb stands for Generate Your Boilerplate. It’s a preprocessor the Swift
> team wrote so that when they needed to build, say, ten nearly-identical
> variants of Int, they wouldn’t have to literally copy and paste the same
> code ten times. If you open one of those files, you’ll see that they’re
> mainly Swift code, but with some lines of code intermixed that are written
> in Python. The actual preprocessor itself is in the Swift source repository
> at utils/gyb, though most of the code is in utils/gyb.py.
>
> --
> Brent Royal-Gordon
> Architechies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151208/f3d636b3/attachment.html>
More information about the swift-users
mailing list