Skip to content
192. wwdc 2015-408 Protocol-Oriented Programming in Swift episode artwork

EPISODE · Nov 11, 2015 · 24 MIN

192. wwdc 2015-408 Protocol-Oriented Programming in Swift

from iOSDevLog · host iOSDevLog

Swift 2 通过 Protocol Extension 大幅强化了 protocol 在这门语言中的地位,而整个 Swift 标准库其实也是基于 protocol 来设计的,使用了大量的 protocol。可以说 Swift 是一门面向 protocol 的语言。这篇教程中列举了一些 protocol 在实际使用中的方法,可以让你掌握面向接口编程的基础知识。 每场研讨会都吸引了团队的注意力,Protocol-Oriented Programming in Swift更是如此。几乎每个成员都表示这个研讨会分享是自己的首选。苹果工程师Dave Abrahams让我们抛开普通的开发方式,跟随他的思路使用protocol-oriented开发方式,而不是类。 在列举完类的好处后,他从反面说到这些益处揭示了Swift是一种基于协议的语言。用动态多态性交换静态多态性,他认为协议和新协议扩展要优于抽象体的超类。在Building Better Apps With Value Types in Swift中也概述了更加强大的Protocols。

Episode metadata supplied by the publisher feed · Published Nov 11, 2015

Embed this episode

Ready to play

192. wwdc 2015-408 Protocol-Oriented Programming in Swift

0:00 24:50

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of iOSDevLog?

This episode is 24 minutes long.

When was this iOSDevLog episode published?

This episode was published on November 11, 2015.

Can I download this iOSDevLog episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!