Esse projeto tem como objetivo traduzir e disponibilizar gratuitamente em português o livro The Swift Programming Language (swift 5.3).
Acesse o guia CONTRIBUTING.md e saiba como ajudar com a tradução!
O livro em inglês está lentamente sendo migrado para o formato de Markdown antes de ser traduzido. A seguintes Sessões já estão em formato Markdown e já podem ser traduzidas através de Pull Requests:
- About Swift
- Version Compatibility
- A Swift Tour
- Language Guide
- The Basics
- Basic Operators
- Strings And Characters
- Intro
- String Literals
- Initializing an Empty String
- String Mutability
- Strings Are Value Types
- Working with Characters
- Concatenating Strings and Characters
- String Interpolation
- Unicode
- Counting Characters
- Accessing and Modifying a String
- Substrings
- Unicode
- Comparing Strings
- Unicode Representations of Strings
- Collection Types
- Intro
- Mutability of Collections
- Arrays
- Sets
- Performing Set Operations
- Dictionaries
- Control Flow
- Intro
- For-In Loops
- While Loops
- Conditional Statements
- Control Transfer Statements
- Early Exit
- Checking API Availability
- Functions
- Intro
- Defining and Calling Functions
- Function Parameters and Return Values
- Function Argument Labels and Parameter Names
- Function Types
- Nested Functions
- Closures
- Intro
- Closure Expressions
- Trailing Closures
- Capturing Values
- Closures Are Reference Types
- Escaping Closures
- Autoclosures
- Enumerations
- Intro
- Enumeration Syntax
- Matching Enumeration Values with a Switch Statement
- Iterating over Enumeration Cases
- Associated Values
- Raw Values
- Recursive Enumerations
- Structures and Classes
- Intro
- Comparing Structures and Classes
- Structures and Enumerations Are Value Types
- Classes Are Reference Types
- Properties
- Intro
- Stored Properties
- Computed Properties
- Property Observers
- Property Wrappers
- Global and Local Variables
- Type Properties
- Methods
- Intro
- Instance Methods
- Type Methods
- Subscripts
- Intro
- Subscript Syntax
- Subscript Usage
- Subscript Options
- Type Subscripts
- Inheritance
- Intro
- Defining a Base Class
- Subclassing
- Overriding
- Preventing Overrides
- Initialization
- Intro
- Setting Initial Values for Stored Properties
- Customizing Initialization
- Default Initializers
- Initializer Delegation for Value Types
- Class Inheritance and Initialization
- Failable Initializers
- Required Initializers
- Setting a Default Property Value with a Closure or Function
- Deinitialization
- Intro
- How Deinitialization Works
- Deinitializers in Action
- Optional Chaining
- Intro
- Optional Chaining as an Alternative to Forced Unwrapping
- Defining Model Classes for Optional Chaining
- Accessing Properties Through Optional Chaining
- Calling Methods Through Optional Chaining
- Accessing Subscripts Through Optional Chaining
- Linking Multiple Levels of Chaining
- Chaining on Methods with Optional Return Values
- Error Handling
- Intro
- Representing and Throwing Errors
- Handling Errors
- Specifying Cleanup Actions
- Type Casting
- Intro
- Defining a Class Hierarchy for Type Casting
- Checking Type
- Downcasting
- Type Casting for Any and AnyObject
- Downcasting
- Nested Types
- Intro
- Nested Types in Action
- Referring to Nested Types
- Extensions
- Intro
- Extension Syntax
- Computed Properties
- Initializers
- Methods
- Subscripts
- Nested Types
- Protocols
- Intro
- Protocol Syntax
- Property Requirements
- Method Requirements
- Mutating Method Requirements
- Initializer Requirements
- Protocols as Types
- Delegation
- Adding Protocol Conformance with an Extension
- Adopting a Protocol Using a Synthesized Implementation
- Collections of Protocol Types
- Protocol Inheritance
- Class-Only Protocols
- Protocol Composition
- Checking for Protocol Conformance
- Optional Protocol Requirements
- Protocol Extensions
- Generics
- Intro
- The Problem That Generics Solve
- Generic Functions
- Type Parameters
- Naming Type Parameters
- Generic Types
- Extending a Generic Type
- Type Constraints
- Associated Types
- Generic Where Clauses
- Extensions with a Generic Where Clause
- Contextual Where Clauses
- Associated Types with a Generic Where Clause
- Generic Subscripts
- Opaque Types
- Intro
- The Problem That Opaque Types Solve
- Returning an Opaque Type
- Differences Between Opaque Types and Protocol Types
- Automatic Reference Counting
- Intro
- How ARC Works
- ARC in Action
- Strong Reference Cycles Between Class Instances
- Resolving Strong Reference Cycles Between Class Instances
- Strong Reference Cycles for Closures
- Resolving Strong Reference Cycles for Closures
- Memory Safety
- Intro
- Understanding Conflicting Access to Memory
- Conflicting Access to In-Out Parameters
- Conflicting Access to self in Methods
- Conflicting Access to Properties
- Access Control
- Intro
- Modules and Source Files
- Access Levels
- Access Control Syntax
- Custom Types
- Subclassing
- Constants, Variables, Properties, and Subscripts
- Initializers
- Protocols
- Extensions
- Generics
- Type Aliases
- Advanced Operators
- Intro
- Bitwise Operators
- Overflow Operators
- Precedence and Associativity
- Operator Methods
- Custom Operators
- Reference Manual
- About The Language Reference
- Lexical Structure
- Intro
- Whitespace and Comments
- Identifiers
- Keywords and Punctuation
- Literals
- Operators
- Types
- Intro
- Type Annotation
- Type Identifier
- Tuple Type
- Function Type
- Array Type
- Dictionary Type
- Optional Type
- Implicitly Unwrapped Optional Type
- Protocol Composition Type
- Opaque Type
- Metatype Type
- Self Type
- Type Inheritance Clause
- Type Inference
- Expressions
- Intro
- Prefix Expressions
- Binary Expressions
- Primary Expressions
- Postfix Expressions
- Statements
- Intro
- Loop Statements
- Branch Statements
- Labeled Statement
- Control Transfer Statements
- Defer Statement
- Do Statement
- Compiler Control Statements
- Availability Condition
- Declarations
- Intro
- Top-Level Code
- Code Blocks
- Import Declaration
- Constant Declaration
- Variable Declaration
- Type Alias Declaration
- Function Declaration
- Enumeration Declaration
- Structure Declaration
- Class Declaration
- Protocol Declaration
- Initializer Declaration
- Deinitializer Declaration
- Extension Declaration
- Subscript Declaration
- Operator Declaration
- Precedence Group Declaration
- Declaration Modifiers
- Attributes
- Intro
- Declaration Attributes
- Type Attributes
- Switch Case Attributes
- Patterns
- Intro
- Wildcard Pattern
- Identifier Pattern
- Value-Binding Pattern
- Tuple Pattern
- Enumeration Case Pattern
- Optional Pattern
- Type-Casting Patterns
- Expression Pattern
- Generic Parameters and Arguments
- Intro
- Generic Parameter Clause
- Generic Argument Clause