• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why can't a Swift method directly access a static member?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why can't a Swift method directly access a static member?


  • Subject: Re: Why can't a Swift method directly access a static member?
  • From: Rick Mann <email@hidden>
  • Date: Wed, 25 Nov 2015 12:25:38 -0800

> On Nov 25, 2015, at 01:04 , Quincey Morris <email@hidden> wrote:
>
> In a technical sense, the reason is probably that Swift allows class/static and instance members to have the same name, presumably because it has to support Obj-C methods, where the same thing can happen. That means there’s a danger of ambiguity, and it was probably decided that the clunkier disambiguation would lead to fewer programmer errors.

Still seems like Swift could use some scope resolution, and just complain if it's ambiguous.

Anyway, thanks. I'll write it up as a feature request.

--
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


References: 
 >Why can't a Swift method directly access a static member? (From: Rick Mann <email@hidden>)
 >Re: Why can't a Swift method directly access a static member? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 12, Issue 656
  • Next by Date: Re: Fade when changing window's rootViewController possible?
  • Previous by thread: Re: Why can't a Swift method directly access a static member?
  • Next by thread: Re: Cocoa-dev Digest, Vol 12, Issue 656
  • Index(es):
    • Date
    • Thread