- 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.
推薦閱讀
- Objective-C Memory Management Essentials
- Java EE框架整合開發入門到實戰:Spring+Spring MVC+MyBatis(微課版)
- 構建移動網站與APP:HTML 5移動開發入門與實戰(跨平臺移動開發叢書)
- Java Web開發之道
- DevOps Automation Cookbook
- Python王者歸來
- Visual C#.NET程序設計
- PySide 6/PyQt 6快速開發與實戰
- Go語言底層原理剖析
- OpenCV 3 Blueprints
- R語言實戰(第2版)
- 例解Python:Python編程快速入門踐行指南
- Getting Started with JUCE
- Beginning PHP
- The Applied Data Science Workshop