- Mastering macOS Programming
- Stuart Grimshaw
- 56字
- 2025-04-04 19:10:24
Type aliases
As previously noted, you may use a typealias to make your code more readable. A simple example would be as follows:
typealias score = Int
This might not make much sense for a lowly integer, but this feature will become more valuable later as we look at types beyond the primitives offered by Swift.