Swift

Swift

Understanding Swift through simple, human stories.

Behind the Curtain - How Swift Structs Are Stored in Memory
Behind the Curtain - How Swift Structs Are Stored in Memory

Background Coder Orangu has always had the perception that structs are stored on the heap and are faster to access. This belief was strengthened by the b...

9 minute read

Swift Dispatch Demystified — What Really Happens Under the Hood.
Swift Dispatch Demystified — What Really Happens Under the Hood.

Background Coder Orangu remembers watching the WWDC session when Apple unveiled Swift for the very first time. The keynote buzzed with excitement — a new...

10 minute read

Behind the Curtain - How Swift Classes Are Stored in Memory
Behind the Curtain - How Swift Classes Are Stored in Memory

Background Coder Orangu has always been curious: “Why can’t extensions support stored properties in Swift?” extension LoginViewModel { var isFirstL...

7 minute read

From Chaos to Clarity - Using TaskGroup Instead of DispatchGroup
From Chaos to Clarity - Using TaskGroup Instead of DispatchGroup

Coder Orangu is working on a travel planner app and encounters a classic problem: How to fetch data from multiple sources and update the UI only after all...

4 minute read

A Case for Non-Copyable Tokens in Swift
A Case for Non-Copyable Tokens in Swift

Logged Out, Token Still Lives A customer reached out to Coder Orangu with a puzzling issue in the mobile app he had developed. Even after users logged ou...

10 minute read

Swift Opaque Type
Swift Opaque Type

Coder Orangu was confused about Swift’s jargons like Opaque Types, Existential Types ,and Type Erasure. After exploring these concepts, he comes here to s...

4 minute read

Swift Dynamic Member Lookup
Swift Dynamic Member Lookup

Since Swift is statically typed, Coder Orangu was missing some of the runtime flexibility offered by Objective-C. While working on a settings screen for a...

2 minute read

Property Wrappers in Swift - (Must Use Feature)
Property Wrappers in Swift - (Must Use Feature)

Coder Orangu often found themselves writing the same repetitive boilerplate code in Swift just to manage variables. Tasks like persistently saving a value...

3 minute read

Swift ?? (Nil Coalescing) Do's and Don't
Swift ?? (Nil Coalescing) Do's and Don't

Basics Optional is one of the fundamental safety features provided in Swift. It is a container for a value of a particular type. We are using the term contai...

2 minute read