Open in app
Home
Notifications
Lists
Stories

Write
Vijay Chandran Jayachandran
Vijay Chandran Jayachandran

Home

Oct 24, 2021

Understanding Swift’s @unknown and @frozen attribute

TLDR: It is for when you are interested in: • compiler optimization. • Generate compile error in-case a new case/property is added. Applicable to enum and struct constructs. Targeted at library authors. NOTE: @frozen is only applicable when developing on something called as Library Evolution mode, introduced in Swift 5.0…

I OS

3 min read

Understanding Swift’s @unknown and @frozen attribute
Understanding Swift’s @unknown and @frozen attribute

Feb 18, 2021

Swift’s mutating and nonmutating keywords

These are access modifiers for the individual methods of a struct or non-class protocols. These apply also to the getter and setter methods of properties. To understand these keywords, lets construct a struct MyStruct holding property underlyingValue of type Int: class MyStruct { private var underlyingValue: Int = 0 } …

Swift Programming

2 min read


Jan 29, 2021

Understanding Swift protocol Associated types

Generics for protocols are what they are. They enable us to write a common protocol that can accomodate variance in data types, for the same names, in the classes that conform to the protocol (NOTE: THIS IS STATEMENT IS JUST MY ATTEMPT TO DEFINE associatedtype IN A SINGLE SENTENCE. DO…

Swift

3 min read


Jan 24, 2021

REALLY Understanding Swift ‘some’ keyword (and Swift Opaque types, consequently)

TLDR; It is like compiler substitution :) HTTR; To understand associatedtypes: https://02infinity.medium.com/understanding-swift-protocol-associated-types-ca717d091b56 I’ve had a hard time wrapping my head around ‘some’ keyword (introduced in swift 5.1). Now that I have that “Ah-ha!” moment, I thought I may be able to help others understand, with this article. I’ll start with…

Swift

3 min read

Vijay Chandran Jayachandran

Vijay Chandran Jayachandran

Engineer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable