Skip to main content
The Swift Programming Language
Contents
Language Guide (29)
- Access Control— Manage the visibility of code by declaration, file, and module.
- Advanced Operators— Define custom operators, perform bitwise operations, and use builder syntax.
- 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.
- Deinitialization— Release resources that require custom cleanup.
- Enumerations— Model custom types that define a list of possible values.
- Error Handling— Respond to and recover from errors.
- Extensions— Add functionality to an existing type.
- Functions— Define and call functions, label their arguments, and use their return values.
- 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...
- 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.
- Properties— Access stored and computed values that are part of an instance or type.
- Protocols— Define requirements that conforming types must implement.
- 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.
- Type Casting— Determine a value's runtime type and give it more specific type information.