Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
Swift Style
About the Pragmatic Bookshelf Table of Contents Early Praise for Swift Style Welcome to Swift Style
How This Book Got Here Your Code Doesn’t Smell What’s in This Book Contributing to This Book Online Resources Ready to Get Going? Credits Thanks
Chapter 1: Structure Your Code for Readability
Taking Control of Swift Structure Understanding Swift Semicolons Styling Colinear Braces Hugging Parentheses Wrapping Argument Lists Coaligning Assignments Improving Closure Hygiene Choosing Trailing Closures Laying Out Partial Application Laying Out Complex Guard Statements Laying Out Ternaries Binary Conditionals Laying Out Long Collections Weighing Late Property Declaration Wrapping Up
Chapter 2: Adopt Conventional Styling
Adopting Conventional Spacing Mandating Maximum Line Widths Selecting Colon Styles Placing Attributes Formatting Number Literals Balancing Literals and Types Constructing Collections with Literals Optional Sugar Mitigating Optional Constipation Converting to Tuples Considering Comma-First Styles Wrapping Up
Chapter 3: Establish Preferred Practices
Testing Assumptions Choosing Optionals Converting Collection Lookup to Optionals Casting Conditionally Chaining Calls Moving from Thrown Errors to Optionals Unwrapping Variables Mapping in Condition Clauses Iterating Collections of Optionals Working with Optional Collections Choosing Result Types Adding Lazy Evaluation Selecting Sequences and Strides Looping Indexing and Enumerating Collections Switch Statements Declaring Number Constants and Variables Implementing Getters and Setters Returning Void Grouping Initializers Using Call Site Inferencing Evaluating Case-Binding Syntax Using If/Guard-Case Choosing Capture Modifiers Other Practices Wrapping Up
Chapter 4: Design the Right APIs
Adopting Access Control Avoiding Global Symbols Nesting Functions Nesting Types Designing Singletons Adding Custom Operators Naming Generic Parameters Naming Symbols Plurality Choosing Label Names Initializers Convenience Initializers Naming Methods and Functions Tips for Naming Mutating Variations Computed Properties vs. Methods Adding Defaults Protocols Generic Beautification Adding Typealiases Choosing Value vs. Reference Types Writing Good Errors Wrapping Up
Chapter 5: Look to the Past and the Future
Reconciling Past You vs. Future You Documenting in Real Time Adding Structured Markup Commenting Well Organizing with Bookmarks Improving Code Descriptions Avoiding Clever Wrapping Up
Chapter 6: Good Code
You May Be Interested In…
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion