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

Re: alloc in Swift


  • Subject: Re: alloc in Swift
  • From: Mike Ellard <email@hidden>
  • Date: Tue, 17 Feb 2015 10:38:28 -0800

Thanks for the clarification.  I wasn’t sure if alloc and new needed to be exposed to support some particular functionality - I’m glad to hear that this isn’t necessary.  

Thanks for all of the great work that everyone has been doing on Swift.  Your team is really amazing.   

Sincerely,

Michael Patrick Ellard


On Feb 17, 2015, at 9:32 AM, Chris Lattner <email@hidden> wrote:

On Feb 13, 2015, at 12:17 PM, Mike Ellard <email@hidden> wrote:
I was exploring the NSObject documentation for Swift and I was surprised to see that alloc is callable in Swift.  
What I would expect:

A) Swift would not expose alloc or `new` at all.  There shouldn’t be a way to create objects without going through an initializer.

Hi Mike,

You’re right, new and alloc shouldn’t be exposed to a Swift programmer.  They are effectively an implementation detail (which isn't memory safe to expose as you point out).  Thanks for filing the radar, we’ll take care of it when we can.

-Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >alloc in Swift (From: Mike Ellard <email@hidden>)
 >Re: alloc in Swift (From: Chris Lattner <email@hidden>)

  • Prev by Date: Re: XCode 6 Link Errors
  • Next by Date: Re: XCode 6 Link Errors
  • Previous by thread: Re: alloc in Swift
  • Next by thread: Xcode 6.1.1 Modernization fails on selectors returning blocks
  • Index(es):
    • Date
    • Thread