Understanding Swift’s Opaque Types

Useful for SwiftUI

Steven Curtis
4 min readSep 21, 2022
Photo by Rod Long on Unsplash

Before we start

Difficulty: Beginner | Easy | Normal | Challenging

This article has been developed using Xcode 12.2, and Swift 5.3

Prerequisites

* You will be expected to be aware how to make a Single View Application in Swift, or be able to use Playgrounds to be able to code in Swift

* I lean rather heavily on Generics

* Access Control is briefly touched upon

* Some knowledge of Protocols would be useful

* Equatable is used later in the article

Keywords and Terminology

Opaque Types: A data type whose concrete data structure is not defined in an interface

This project

Background

SwiftUI makes use of the some keyword, as

--

--