#swift

Found 79 articles tagged with #swift

Type checking vs type casting in Swift

Swift provides several ways to check and cast types, which can be useful when working with objects that have been inherited from a superclass or implemented a protocol.

Mar 26, 2023#swift#types

What's New in Swift 5.9

This version will include features like convenience async stream methods, if and switch expressions, importing Objective-C forward declarations, discarding task groups.

Swift AnyObject, AnyClass, Any, and `any`

Swift has special types to work with nonspecific types, useful in certain scenarios because they provide a lot of flexibility in working with different types of data.

Mar 22, 2023#swift#types

A Comprehensive Comparison of Swift and Objective-C

Swift and Objective-C are two programming languages used for developing iOS, macOS, and watchOS applications. Objective-C has been theā€¦.

Swift Advanced Custom Pattern Matching

When you use pattern matching in Swift, the compiler uses the `~=` operator behind the scenes to match the value against each case pattern.

Mar 17, 2023#patterns#swift

A Beginner Guide to Pattern Matching in Swift

In Swift, pattern matching is a powerful feature that can be used to match values against a set of patterns, including ranges, optionalsā€¦.

Mar 17, 2023#patterns#swift

Swift Platform Compilation Conditions

Swift compiler supports platform compilation conditions on whether to build certain parts of the code. Unlike regular and which execute atā€¦.

Mar 13, 2023#swift#compiler

Swift @main Entry Points

Learning different attributes like @main, @UIApplicationMain, or @NSApplicationMain for designating a type as the entry point for beginning program execution.

Mar 12, 2023#swift

Swift Sendable protocol and @Sendable attribute

We need a way to differentiate between the cases that are safe to transfer between concurrency domains and those that are not.

Mar 11, 2023#swift#concurrency

Swift Continuations

Asynchronous tasks can suspend themselves on continuations which synchronous code can then capture and invoke to resume the task in response to an event.

Mar 10, 2023#swift#concurrency