- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 135字
- 2021-07-02 23:54:30
Access control
Access control restricts access to parts of our code from code in other source files and modules. Access levels are as follows:
- Open and Public accesses enable entities to be used within any source file from their defining module and also in a source file from another module that imports the defining module. Open access enables subclassing, as opposed to Public access, which disallows subclassing.
- Internal access enables entities to be used within any source file from their defining module, but not in any source file outside of this module.
- File-private access restricts the use of an entity to its defining source file.
- Private access restricts the use of an entity to its enclosing declaration.
Swift evolution proposals SE-0025 and SE-0117 explain the motivation, proposed solution, and provide code examples for access levels.
推薦閱讀
- 公有云容器化指南:騰訊云TKE實(shí)戰(zhàn)與應(yīng)用
- 同步:秩序如何從混沌中涌現(xiàn)
- MySQL基礎(chǔ)教程
- 數(shù)據(jù)要素五論:信息、權(quán)屬、價(jià)值、安全、交易
- Lean Mobile App Development
- 大數(shù)據(jù):從概念到運(yùn)營(yíng)
- 數(shù)據(jù)庫(kù)原理與應(yīng)用(Oracle版)
- 數(shù)亦有道:Python數(shù)據(jù)科學(xué)指南
- 網(wǎng)站數(shù)據(jù)庫(kù)技術(shù)
- Python數(shù)據(jù)分析與挖掘?qū)崙?zhàn)(第3版)
- 大數(shù)據(jù)治理與安全:從理論到開(kāi)源實(shí)踐
- 數(shù)據(jù)庫(kù)應(yīng)用系統(tǒng)開(kāi)發(fā)實(shí)例
- Unreal Engine Virtual Reality Quick Start Guide
- 大數(shù)據(jù)時(shí)代系列(套裝9冊(cè))
- 中國(guó)云存儲(chǔ)發(fā)展報(bào)告