Skip to main content
The Swift Programming Language
Articles
- A Swift Tour— Explore the features and syntax of Swift.
- About Swift— Understand the high-level goals of the language.
- About the Language Reference— Read the notation that the formal grammar uses.
- Access Control— Manage the visibility of code by declaration, file, and module.
- Advanced Operators— Define custom operators, perform bitwise operations, and use builder syntax.
- Attributes— Add information to declarations and types.
- Automatic Reference Counting— Model the lifetime of objects and their relationships.
- Basic Operators— Perform operations like assignment, arithmetic, and comparison.
- Closures— Group code that executes together, without creating a named function.
- Collection Types— Organize data using arrays, sets, and dictionaries.
- Concurrency— Perform asynchronous operations.
- Control Flow— Structure code with branches, loops, and early exits.
- Declarations— Introduce types, operators, variables, and other names and constructs.
- Deinitialization— Release resources that require custom cleanup.
- Document Revision History— Review the recent changes to this book.
- Enumerations— Model custom types that define a list of possible values.
- Error Handling— Respond to and recover from errors.
- Expressions— Access, modify, and assign values.
- Extensions— Add functionality to an existing type.
- Functions— Define and call functions, label their arguments, and use their return values.
- Generic Parameters and Arguments— Generalize declarations to abstract away concrete types.
- Generics— Write code that works for multiple types and specify requirements for those type...
- Inheritance— Subclass to add or override functionality.
- Initialization— Set the initial values for a type's stored properties and perform one-time setup...
- Lexical Structure— Use the lowest-level components of the syntax.
- Macros— Use macros to generate code at compile time.
- Memory Safety— Structure your code to avoid conflicts when accessing memory.
- Methods— Define and call functions that are part of an instance or type.
- Nested Types— Define types inside the scope of another type.
- Opaque and Boxed Protocol Types— Hide implementation details about a value's type.
- Optional Chaining— Access members of an optional value without unwrapping.
- Patterns— Match and destructure values.
- Properties— Access stored and computed values that are part of an instance or type.
- Protocols— Define requirements that conforming types must implement.
- Statements— Group expressions and control the flow of execution.
- Strings and Characters— Store and manipulate text.
- Structures and Classes— Model custom types that encapsulate data.
- Subscripts— Access the elements of a collection.
- The Basics— Work with common kinds of data and write basic syntax.
- The Swift Programming Language (6.3 beta)— @Metadata {
@TechnologyRoot
}
- Type Casting— Determine a value's runtime type and give it more specific type information.
- Types— Use built-in named and compound types.
- Version Compatibility— Learn what functionality is available in older language modes.