Limited import clarification and its effect
summary
Swift import accepts attributes like @_exported and @_testable and can target submodules with import Module.Submodule, plus a limit by kind (struct class protocol typealias func) syntax to restrict which symbols are pulled in. Examples show SceneKit submodules exposing model-building APIs and conflicts resolved by qualifying the module. Measured with 100,000 extra methods, build time and binary MD5 remain effectively unchanged, so the compiler optimizes away size/performance differences — use limited imports for clarity and name control, not for binary shrinkage.
AI-written summary · about
chapters (13)
- 0:00Intro
- 0:28Import Declaration
- 0:47Attributes
- 1:01@testable
- 1:12@_exported
- 1:27Submodule import
- 1:42Example: SceneKit initializer
- 2:13Kind import
- 3:22Example: Conflict method name
- 4:02Import Options
- 4:18Measuring the build times
- 4:38Binary size
- 4:57Pros & Cons
related talks
47mSwift Glue Code
36mSWIFT ABI Essentials: How to Maximize Your App's Efficiency
25mUse C, C++ and Objective C Libraries in a Swift Project
44mSwift Packages - Dependency Management of the Future
51mSwift 2 Under the Hood
39mModularization techniques from monolithic to multi-packages app
20mParameter Packs or How Swift Decided to Become C++
49mEffective Kotlin-Swift Interoperability
