Swift
Linked Notes:
Algrebaic Data Types
In programming, especially functional programming, algrebaic data type is kind of type that is composed from other types. In [[Swift]] we have enum and struct as algrebaic data types. enum is kind of sum types meanwhile struct is product types.
Explore structured concurrency in Swift
The idea is based on structured programming. The easiest example is if-else statement where it only execute some block of code conditionally while moving from top to bottom.
It never gets easier, you just go faster
I found this quote when travelling through some [[Digital garden]] and after searching who’s the first one who say it, turns out he’s Greg LeMond, the first American who win Tour de France.
Sourcery
What is Sourcery
Source: https://github.com/krzysztofzablocki/Sourcery
Sourcery is a tool that allowed us to generate boilerplate code from our [[Swift]] code.
Understanding Swift underscored attributes
Swift has something called underscored attributes which usually used by standard library developers and usage of the outside Swift repo is strongly discourage
Working with Codable in Swift
One of the most common task as iOS developer is get the data from server then parse them so it can be presented nicely to user. On iOS we have Codable protocols that allow us to encode and decode data into standard format (e.g JSON or Property List) Usually you...