• 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: Bindings in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings in Swift


  • Subject: Re: Bindings in Swift
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 11 Aug 2014 16:34:30 -0700

On Aug 11, 2014, at 16:14 , Greg Parker <email@hidden> wrote:

> Do you have an example?

For example (beta 5), enter some source that uses type “Array”, then command-click on “Array”. (I don’t know how to get Xcode to display the resulting file directly, so I’ve been using this technique. I don’t know if the result is real or synthetic.)

Look for the 2nd “extension Array”, and the 2nd constructor in this extension:

	init<S : SequenceType where T == T>(_ s: S)

or look at ‘extend’ or look at ‘join’.

Incidentally, I had other issues when trying to use things declared in this file. For example, if I try to define a class that conforms to “Collection”, the compiler says “‘Collection' is ambiguous for type lookup in this context”.

(What I was trying to do was define a new class that had the same interface as an Array, but had only the immutable parts of the interface as its public API.)

_______________________________________________

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: 
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Roland King <email@hidden>)
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Roland King <email@hidden>)
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Kyle Sluder <email@hidden>)
 >Re: Bindings in Swift (From: Roland King <email@hidden>)
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Bindings in Swift
  • Next by Date: Re: Mod (%) function in C/Objective-C?
  • Previous by thread: Re: Bindings in Swift
  • Next by thread: Re: Bindings in Swift
  • Index(es):
    • Date
    • Thread