• 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: Script Libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Libraries


  • Subject: Re: Script Libraries
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 20 Jun 2016 11:47:04 +1000

On 20 Jun 2016, at 10:53 AM, Phil Stokes <email@hidden> wrote:
>
> Interestingly though, despite the fact that the Cocoa APIs are written interleaved, Apple now wants them to do it "the other way" with Swift.

Not really. Yes, they're using parens, but the parameters (apart from the first one) are still individually named. Here's an example from the docs in Swift 2.2:

func sayHello(personName: String, alreadyGreeted: Bool) -> String {

//

sayHello("Tim", alreadyGreeted: true))

The Wikipedia entry describes it as "the interleaving of selector segments with argument expressions, for which there is no direct equivalent in C/C++".


--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Re: Script Libraries (From: Jim Underwood <email@hidden>)
 >Re: Script Libraries (From: Shane Stanley <email@hidden>)
 >Re: Script Libraries (From: Phil Stokes <email@hidden>)

  • Prev by Date: Re: Script Libraries
  • Next by Date: Re: Script Libraries
  • Previous by thread: Re: Script Libraries
  • Next by thread: Re: Script Libraries
  • Index(es):
    • Date
    • Thread