• 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: swift and objective-c
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: swift and objective-c


  • Subject: Re: swift and objective-c
  • From: Milton Moura <email@hidden>
  • Date: Wed, 04 Jun 2014 17:55:38 +0000

Title: Re: swift and objective-c
According to the docs, both:

"Classes and structures can provide their own implementations of existing operators. This is known as overloading the existing operators."

and

"You can declare and implement your own custom operators in addition to the standard operators provided by Swift. Custom operators can be defined only with the characters / = - + * % < > ! & | ^ . ~."

Source:
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html

-mgcm

On 04/06/2014, at 16:43, Gordon Apple <email@hidden> wrote:

New operators or operator overloading? The latter is one of the things I most miss from C++.


On 6/4/14 10:51 AM, "email@hidden" <email@hidden> wrote:

Given that Swift apparently allows the invention of new operators (I haven't read that far in the book yet), there's no reason not to add your own pair of operators that work the way you want.

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: 
 >Re: swift and objective-c (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: swift and objective-c
  • Next by Date: Swift question
  • Previous by thread: Re: swift and objective-c
  • Next by thread: Re: swift and objective-c
  • Index(es):
    • Date
    • Thread