#swift

Found 79 articles tagged with #swift

Swift actor isolated vs nonisolated

Swift actor isolation is a feature of Swift concurrency that allows actors to protect their state from concurrent access by other actors or….

Apr 02, 2023#swift#concurrency

Swift function back deployment

Function back deployment, using new @backDeployed attribute in Swift 5.8, is a feature that allows library authors to make new APIs available on older platform versions.

Apr 01, 2023#swift#attributes

How to Implement Type Erasure in Swift

Type erasure in Swift is a technique that lets you use generic protocols or protocols with associated types as concrete types, by hiding or erasing the specific type information.

Apr 01, 2023#swift#how-to

Swift existential types (`any P`)

The `any` keyword in Swift was introduced in Swift 5.6 and improved in Swift 5.7. It is used to create an existential type that represents any concrete type that conforms to a specific protocol.

Mar 31, 2023#swift

Swift heterogeneous collections (mixed arrays, sets, dictionaries)

Swift provides three primary collection types —arrays, sets, and dictionaries— implemented as generic types, which means they can store any….

Mar 31, 2023#swift#faqs

Swift Task Groups

Swift task groups (TaskGroup, ThrowingTaskGroup) are a feature introduced in Swift 5.5 that allow you to create and manage a collection of….

Mar 31, 2023#swift#concurrency

Swift Task.init vs Task.detached

A task can run in the background and communicate with the UI thread when needed. To create and run a task in Swift, you can use initializers Task.init vs Task.detached.

Mar 31, 2023#swift#concurrency

6 ways to use "where" clause in Swift

The clause in Swift is a way to specify additional constraints on generic types, functions, associated types, or control flow statements….

Mar 30, 2023#swift

Swift Async/Await

Swift async/await is a new programming model introduced in Swift 5.5 (released on September 20, 2021) for writing asynchronous code that is….

Mar 28, 2023#concurrency#swift

The Problems with Completion Handlers in Swift

Asynchronous programming is an essential part of modern software development, allowing applications to perform long-running tasks without….

Mar 28, 2023#concurrency#swift