Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Zhao Xin via swift-users
Yes, I had. There was a `class` and `static` post under it. But I disagreed that and my interpretation was just opposite. Zhaoxin On Fri, May 12, 2017 at 1:11 AM, Adrian Zubarev < adrian.zuba...@devandartist.com> wrote: > Have you read closely the bug issue before posting your answer? > > > >

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Jose Cheyo Jimenez via swift-users
I can understand class being a keyword because you use the same word to declare an object. So `class` is used in different contexts like you showed below. That is not the case for static. Class can appear at the top level but IFAIK static will not appear at top level declarations. > On May

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Adrian Zubarev via swift-users
Furthermore: In a class declaration, the static keyword has the same effect as marking the declaration with both the class and final declaration modifiers. Source. --  Adrian Zubarev Sent with Airmail Am 11. Mai 2017 um 19:07:53, Austin Zheng (austinzh...@gmail.com) schrieb: `class` and

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Adrian Zubarev via swift-users
Have you read closely the bug issue before posting your answer? --  Adrian Zubarev Sent with Airmail Am 11. Mai 2017 um 19:05:13, Zhao Xin (owe...@gmail.com) schrieb: No. I think it is just a compromise. Zhaoxin On Fri, May 12, 2017 at 1:01 AM, Adrian Zubarev

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Austin Zheng via swift-users
`class` and `static` in classes have subtly different meanings, if I recall correctly. A `class` declaration can be overriden in subclasses; a `static` one can't. Best, Austin On Thu, May 11, 2017 at 10:04 AM, Zhao Xin via swift-users < swift-users@swift.org> wrote: > No. I think it is just a

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Zhao Xin via swift-users
No. I think it is just a compromise. Zhaoxin On Fri, May 12, 2017 at 1:01 AM, Adrian Zubarev < adrian.zuba...@devandartist.com> wrote: > I don’t think this is the answer that was asked for. I bet it’s more a > technical question from the internal point of of view. > > > > -- > Adrian Zubarev >

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Adrian Zubarev via swift-users
I don’t think this is the answer that was asked for. I bet it’s more a technical question from the internal point of of view. --  Adrian Zubarev Sent with Airmail Am 11. Mai 2017 um 18:59:58, Zhao Xin via swift-users (swift-users@swift.org) schrieb: In Swift, you use `static in struct and

Re: [swift-users] Why is static a keyword?

2017-05-11 Thread Zhao Xin via swift-users
In Swift, you use `static in struct and enum` and `class in class`. For example, struct Foo { static func bar() { } } class ClassFoo { class func bar() { } } Another the `class func bar()` can replace to `static` as well. Here the `static` and `class` are equal in