Import Foundation

I apologize for asking what may be an intuitive question, but if I truly understood, I wouldn’t ask. Why is it that everytime I create one of the .swift files, the text insists on deleting the “Import Foundation.” If this is part of the template, then why do I delete it? Please share your ideas of what I loose or gain by removing this line.

If you are writing code that does not use the symbols defined in the Foundation module, then you can safely delete the import Foundation directive to speed up the compilation process.

So by deleting the import Foundation directive, you are speeding up the compilation process by not reading all those symbols you don’t need.

To see what’s imported by import Foundation, just command-click on the Foundation token.