Re: Why can't Swift instance methods call class methods without qualification?
Re: Why can't Swift instance methods call class methods without qualification?
- Subject: Re: Why can't Swift instance methods call class methods without qualification?
- From: Kyle Sluder <email@hidden>
- Date: Thu, 30 Jun 2016 19:33:41 -0500
On Thu, Jun 30, 2016, at 07:20 PM, Rick Mann wrote:
> Why can my instance methods not call class methods without the class
> specifier?
>
> class MyClass
> {
> func
> foo()
> {
> classMethod()
> }
>
> class
> func
> classMethod()
> {
> }
> }
>
> Why do I have to call MyClass.classMethod()? Just a choice made by the
> language designers to distinguish the call at the call site? I like C++'s
> way of treating all static methods as directly available to the instance.
The official swift-users list might be a better place to ask this
question:
https://lists.swift.org/mailman/listinfo/swift-users
--Kyle Sluder
>
> --
> Rick Mann
> email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden