dotSwift 2016 - Rob Napier - Beyond Crusty: Real-World Protocols

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 6

  • @DenisG631
    @DenisG631 8 лет назад +3

    Best talk ever. Really amazing. Thank you for uploading this!

  • @joqqy8497
    @joqqy8497 5 лет назад +1

    As of Swift 5.1 we now have *opaque types* (some Protocol) which allows the use of a *protocol with associated types or Self as a type* .

  • @mfaani
    @mfaani 7 лет назад +1

    AFAIK The entire logic of the video is still correct only that after Swift 2.2 : The `typealias` in Protocols has changed to `associateType`. Meaning at this 2:53 it should be `associatedType Food`

  • @d4Rk42
    @d4Rk42 5 лет назад

    Is there a way to use something like this to work around the issue that protocols can't be equatable as well? Maybe the problem is, that I try to use Swift's protocols like other language's interfaces (e.g. C#), but it just is something different here. Just drives me nuts. Can't be so difficult -.-
    The only thing I came up with, was type erasure. But then in the end the actual type is still not Equatable, and when using it as Equatable, I lose the actual type. 0_o
    Or am I just doing it completely wrong :-|
    I love Swift, but never got my head around protocols (especially PATs), they just feel so (sry) crippled, when coming from e.g. C#.
    PS: really awesome talk (in all this frustration I almost forget to mention)

  • @jpmizell
    @jpmizell 7 лет назад +3

    Crusty would not be impressed by the number of camera angles.

  •  8 лет назад

    I wish I had seen this the day it was published, hahaha