Skip to content

Commit a52bc31

Browse files
author
linwenbang
committed
fix #1257
1 parent 8c5190f commit a52bc31

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Reports/2019/#61-2019.04.01.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ mPaaS 是支付宝移动开发所依赖的平台服务,它承载了支付宝
2525

2626
Swift 4.2 优化设计了 Hashable 协议,引入了新的 default implementation `func hash(into: inout Hasher) `,并以 Hash-flooding 攻击为知识背景详细介绍了为什么 Apple 官网文档不建议继续使用 `var hashValue` 的原因。
2727

28+
### [Swift, more elegant code: Typealias](https://medium.com/@ahmadfayyas/swift-quick-elegant-code-typealias-8e6d59f07f32)
29+
30+
31+
本文作者使用两个例子,一正一反,运用对比论证的手法,生动形象地说明了 Typealias 的恰当用法。
32+
别名的使用,在于将很长的声明类型缩短,增加可读性。常用于在 Swift closure (类比 Objective-C block `typedef` 场景)。
33+
34+
```
35+
typealias Success = (_ data: Data, _ message: String, _ status: Int, _ isEnabled: Bool) -> ()
36+
```
37+
38+
@[sunsetwan](https://github.com/SunsetWan) 推荐
39+
40+
2841
## 文章
2942

3043
### 🐎 [CodeHub#1 回顾 | 敏捷开发与动态更新在支付宝 App 内的实践](https://mp.weixin.qq.com/s/eXzojM0lCaaCW4JxBaU6BQ)

0 commit comments

Comments
 (0)