Тёмный

Protocol Witnesses - Brandon Williams - App Builders 2019 

Swiss Mobile Developers Association
Подписаться 2,9 тыс.
Просмотров 11 тыс.
50% 1

Protocol-oriented programming is strongly recommended in the Swift community, and Apple has given a lot of guidance on how to use it in your everyday code. However, there has not been a lot of attention on when it is not appropriate, and what to do in that case. We will explore this idea, and show that there is a completely straightforward and mechanical way to translate any protocol into a concrete datatype. Once you do this you can still write your code much like you would with protocols, but all of the complexity inherit in protocols go away. Even more amazing, a new type of composition appears that is difficult to see when dealing with only protocols. We will also demo a real life, open source library that was originally written in the protocol-oriented way, but after running into many problems with the protocols, it was rewritten entirely in this witness-oriented way. The outcome was really surprising, and really powerful.
/ mbrandonw
appbuilders.ch

Наука

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

 

2 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@khanhtoanle8396
@khanhtoanle8396 4 года назад
Its excellent, Im very suprised about this talk
@filiplazov5895
@filiplazov5895 5 лет назад
Truly inspiring!
@jacksonmiller6609
@jacksonmiller6609 6 месяцев назад
“GwaaaAAHHHH, Protocol Witness Blast!!!”
@ion4169
@ion4169 4 года назад
The slide at 15:20 is wrong, [[1,2], [3,4]].reduce(0, concat) will yield error: cannot convert value of type 'Int' to expected argument type '[Int]'
@duanwen4648
@duanwen4648 5 лет назад
nice talk.
Далее
It's the opposite! Challenge 😳
00:12
Просмотров 3,1 млн
🚀  TDD, Where Did It All Go Wrong (Ian Cooper)
1:03:55
Просмотров 551 тыс.