• 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: Language options: Objective-C, Swift, C or C++?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Language options: Objective-C, Swift, C or C++?


  • Subject: Re: Language options: Objective-C, Swift, C or C++?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 14 Jun 2015 01:48:46 +0000

On Jun 13, 2015, at 18:20 , Gary L. Wade <email@hidden> wrote:
>
> To answer your question, Swift adds […]

To get more specific, I just made a quick pass through the Swift documentation, and came up with the following list of things where Swift adds useful functionality and/or features that we’ve been asking for for a long time:

> Massive elimination of source duplication
> Massive elimination of source boilerplate
> Value types as a programming paradigm
> Range operators (...)
> Grapheme-based Unicode strings
> Value-type strings
> Value-type collections
> Homogenous collection types (Obj-C has it now, more or less, but only because of Swift)
> Non-integer, non-literal switch case types
> Patterns in switch cases
> Explicit fall-through control of switch case types
> Switch case “protected scopes” eliminated
> Patterns in conditional cases
> Where clauses
> Label-targeted continue/break statements
> SDK API availability checking
> Overloadable functions
> Multiple function return values
> Parameter keywords in function calls
> Default parameter values
> Nested function declarations
> Closure expression syntax improvements
> Operator definitions
> Operator functions
> Enums are not ints
> Enum cases can have associated values
> Structs can have behavior (methods)
> Deterministic rules for initializer methods (calling and inheritance)
> Lazy stored properties
> Property observers
> Class properties
> Mutability controls
> Improved access controls
> Safe method overridability
> Override prevention
> Enhanced initializer behavior and syntax
> Automatic zombie detection
> Capture lists for closures
> Optionals
> Optional chaining and unwrapping
> Improved error handling model
> Scope-exit cleanup actions
> Safer type casting
> Nested types
> Safe class extensions
> Protocols are types
> Protocols can have default behavior (methods)
> Constrained protocols
> Generics

That list doesn’t include benefits discussed elsewhere.



_______________________________________________

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: Language options: Objective-C, Swift, C or C++?
      • From: Carl Hoefs <email@hidden>
References: 
 >Re: Language options: Objective-C, Swift, C or C++? (From: Roland King <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Graham Cox <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Michael David Crawford <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: Carl Hoefs <email@hidden>)
 >Re: Language options: Objective-C, Swift, C or C++? (From: "Gary L. Wade" <email@hidden>)

  • Prev by Date: Re: Language options: Objective-C, Swift, C or C++?
  • Next by Date: Re: Language options: Objective-C, Swift, C or C++?
  • Previous by thread: Re: Language options: Objective-C, Swift, C or C++?
  • Next by thread: Re: Language options: Objective-C, Swift, C or C++?
  • Index(es):
    • Date
    • Thread