LoginSignup
12
12

More than 5 years have passed since last update.

Swiftの名前空間は暗黙的、アクセス制限修飾子は将来追加されるかも

Posted at

名前空間

「Swiftにおいて名前空間は暗黙のうちに提供される。すべてのクラスはそのモジュール (Xcode上のターゲット)によって暗黙のうちにスコープが制限される。クラスプレフィックスはもはや不要」
原文: Namespacing is implicit in swift, all classes (etc) are implicitly scoped by the module (Xcode target) they are in. no class prefixes needed
https://twitter.com/clattner_llvm/status/474730716941385729 (Swiftの作者 Chris Lattnerのツイート)

アクセス制限修飾子 (public, private, etc..)

現状public, privateなどの予約語は存在しない、しかし

Apple Developer ForumsでAppleのエンジニア曰く
「将来の約束は一般的にしてないんだけど、今回は例外。Swiftにはアクセス制限のための仕組みを追加予定です」とのこと
原文: "We don't usually promise anything for the future, but in this case we are making an exception. Swift will have access control mechanisms."
情報元: http://stackoverflow.com/questions/24003918/does-swift-have-access-modifiers

12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12