To answer your question, Swift adds an expressiveness for nullability to APIs, 
more type expressiveness on collection constituents, a better pattern for 
if/else if/else if/.../else for object-equality testing that mirrors C 
switch/case, less conversion needed between analogous C types and Cocoa-related 
types, and with Swift 2, a compiler-supported, single-runtime-coded method to 
deal with unsupported APIs on older OSes. There are others, by the way.

All of these things can be done with Objective-C and lots of C-based code, but 
those require comments, extra code, and an understanding on the part of the 
developer to remember certain patterns whereas with Swift, the compiler 
enforces these.

One can write object-oriented code that mirrors the functionality of C++ by 
using structures, function pointers, and multiple synchronized arrays, but when 
you have a means to do all that for you, you're free to move on to developing 
what you really want rather than working on the plumbing all the time. Of 
course, compiler developers must think of these things, but the vast majority 
of us aren't them.

Disclaimer: I've not jumped onto the Swift bandwagon yet due to a variety of 
reasons, but I will soon.
--
Gary L. Wade (Sent from my iPad)
http://www.garywade.com/

> On Jun 13, 2015, at 4:42 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
> wrote:
> 
> Bingo. Even after reading all the posts in this thread, I still don’t know 
> what problem Swift addresses, and no one seems to be able to answer that 
> question — not even Apple in its marketing hype.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to