Тёмный

Generic Swift: It Isn’t Supposed to Hurt - Rob Napier 

ChariotSolutions
Подписаться 9 тыс.
Просмотров 7 тыс.
50% 1

They said Swift is “protocol oriented,” so you wrote protocols. But you wanted them to be generic, so you added associated types. But your collections broke, so you added type-erasers. But your “as”-casts broke, so you switched to Any. But then everything broke, so you read about Mirror. And the tears began. Why did it have to be so hard to make an array?
It doesn’t have to be so hard. But it’s very easy to use the wrong tools to solve the wrong problems. In this session I’ll help you reevaluate what it means to write generic Swift and how to choose the right tools for the job. Whether your goal is reusable view controllers, flexible networking, data-driven UI, effective unit testing, or just the joy of elegant data structures, you’ll learn how to work with Swift and not fight the compiler.
This talk assumes familiarity with Swift syntax for generics, protocols, extensions, enums, and first-class functions (such as completion handlers), as well as the basic differences between Swift structs and classes. More advanced topics, including protocols with associated types, enums with associated data, closures, and functions as return types, will be introduced and explained.
Philly ETE 2019 Playlist: • Philly ETE 2019
On the Chariot Solutions site: chariotsolutions.com/screencasts/

Наука

Опубликовано:

 

4 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@mrbam8833
@mrbam8833 3 года назад
Perhaps the best Swift talks I've ever seen. Thank you Sir!
@cduhn
@cduhn 3 года назад
Amazing talk. Watching this, I think I attained a new personal record for epiphanies per minute. Thank you!
@Brrainz
@Brrainz 3 года назад
Much better than I thought! -> DOUBLE THUMBS UP
@xplax24
@xplax24 2 года назад
New existential unlock implementation and the introduction of "any" keyword will help a lot to alleviate the headaches around the problem 😭
@aly-bocarcisse613
@aly-bocarcisse613 2 года назад
I have a lot to think about, thanks !
@ssaai
@ssaai 4 года назад
Excellent 👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👍🏻
@alxkub
@alxkub Год назад
Talks like this make me want to quit programming completely. I will never be able to understand this stuff.
@Lircking
@Lircking Месяц назад
just learn haskell bro
@caballopalido
@caballopalido 3 года назад
what is this man's onlyfans?
Далее
Alexis Gallagher - Protocols with Associated Types
56:07
A simple guide to chaos theory - BBC World Service
5:10
Enums considered harmful
9:23
Просмотров 196 тыс.
Generics in Swift: Protocols with associated types
15:37
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
Blackview N6000SE Краш Тест!
1:00
Просмотров 32 тыс.