• 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 parameter names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift and parameter names


  • Subject: Re: Swift and parameter names
  • From: Graham Cox <email@hidden>
  • Date: Thu, 02 Jul 2015 09:28:11 +1000

> On 2 Jul 2015, at 7:22 am, Greg Parker <email@hidden> wrote:
>
> Classic Mac OS was inconsistent. For example, the C struct initializer for Rect was { top, left, bottom, right }, but the initializer function was SetRect(&rect, left, top, right, bottom).


Ah, the good old days /sarc

Obviously it’s only a convention, but I think horizontal values should always precede vertical ones, if only because x comes before y in the alphabet, and map coordinates are that way around as well. The change to {origin, size} was also very welcome, if only because moving a rect is now independent from sizing it, and doing either only changes two values, not four.

—Graham



_______________________________________________

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


  • Follow-Ups:
    • Re: Swift and parameter names
      • From: Charles Srstka <email@hidden>
References: 
 >Re: Swift and parameter names (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Swift and parameter names (From: Charles Srstka <email@hidden>)
 >Re: Swift and parameter names (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: NSTableView row heights with auto layout and bindings
  • Next by Date: Swift 2 init() with CF types and throws
  • Previous by thread: Re: Swift and parameter names
  • Next by thread: Re: Swift and parameter names
  • Index(es):
    • Date
    • Thread