Generic code enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define. You can write code that avoids duplication and expresses its intent in a clear, abstracted manner.
I n this video we are going to take a look at how you can get started writing your own generic, reusable functions.
We will cover the basics before we explore a couple of different, practical examples.
If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch
******* Download my StewartLynch YouTube Channel Application - Free **********
https://stewartlynch.gumroad.com/l/obsjz
Table of Contents:
0:00 Introduction
1:20 The Basics
8:36 Decoding with Generics
15:32 Multiple Protocol Conformance
Starter Project Files:
http://www.createchsol.com/StarterPro...
Completed Project:
https://github.com/StewartLynch/Intro...
Other references:
JSON Codable Series
• JSON and Codable Protocol - Swift
Access Control in Swift
• Access Control levels in Swift
Sorted Higher Order Function
https:// • contains, forEach, sorted
Reduce Higher Order Function
• reduce, filter, removeAll
Other References:
Stewart Lynch's YouTube Channel:
/ stewartlynch
Stewart Lynch on Twitter:
/ stewartlynch
CreaTECH Solutions Website:
https://www.createchsol.com
Stewart Lynch's GitHub:
https://github.com/StewartLynch
Watch video Introduction to Generics in Swift online without registration, duration hours minute second in high quality. This video was added by user Stewart Lynch 02 May 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,543 once and liked it 261 people.