- 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.
推薦閱讀
- C++程序設(shè)計(jì)教程
- UNIX編程藝術(shù)
- C# 7 and .NET Core Cookbook
- R語言經(jīng)典實(shí)例(原書第2版)
- Java面向?qū)ο筌浖_發(fā)
- Mastering Entity Framework
- Python Network Programming Cookbook(Second Edition)
- 名師講壇:Java微服務(wù)架構(gòu)實(shí)戰(zhàn)(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Python面向?qū)ο缶幊蹋簶?gòu)建游戲和GUI
- UVM實(shí)戰(zhàn)
- Java Web開發(fā)詳解
- 愛上micro:bit
- Linux Shell核心編程指南
- Django 3.0應(yīng)用開發(fā)詳解
- Django實(shí)戰(zhàn):Python Web典型模塊與項(xiàng)目開發(fā)