- Reactive Programming with Swift 4
- Navdeep Singh
- 110字
- 2021-06-24 18:58:02
Default parameter values must be public
The compiler now checks accessibility of referenced objects a bit more strictly; non-literal values that you want to use in public functions as arguments should also be public. Among other things, this exposes an opportunity for optimizing access to the value at the call site. As this may involve API design, the migrator does not suggest fixes, although there are some possibilities for you to consider as an API author:
- Making the referenced default values public
- Providing public functions that return a sensible default value
In both cases, consider the impact of exposing a new API, ensuring that you document your public symbols.
推薦閱讀
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- Learning Chef
- C# Programming Cookbook
- Developing Middleware in Java EE 8
- Spring Boot+Spring Cloud+Vue+Element項目實戰:手把手教你開發權限管理系統
- Windows Presentation Foundation Development Cookbook
- Java程序設計與實踐教程(第2版)
- Python機器學習實戰
- 基于Swift語言的iOS App 商業實戰教程
- Building a Quadcopter with Arduino
- 現代C++編程實戰:132個核心技巧示例(原書第2版)
- Learning AWS
- 運維前線:一線運維專家的運維方法、技巧與實踐
- 軟件體系結構
- ASP.NET求職寶典