Swift Language Highlights: An Objective-C Developer's Perspective

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

Swift Language Highlights: An Objective-C Developer's Perspective

Postby rwenderlich » Wed Jun 04, 2014 3:11 am

This is the official thread to discuss the following blog post: Swift Language Highlights: An Objective-C Developer's Perspective
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Site Admin
 
Posts: 2512
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 36 times
Been thanked: 479 times

Postby roemba » Wed Jun 04, 2014 7:16 am

Great. Thank you so much. Very helpfull.
roemba
n00b
 
Posts: 1
Joined: Sat Nov 03, 2012 9:28 am
Has thanked: 0 time
Been thanked: 0 time

Postby Jack Wu » Wed Jun 04, 2014 7:27 am

Interesting point I got from a swift engineer today on mutability - it behaves slightly differently between arrays and dictionaries.

For dictionaries defined with let, it is completely immutable.

For arrays defined with let, the backing buffer (and thus size) cannot be changed, but you can replace individual objects.

Apparently this is all subject to change though!
User avatar
Jack Wu
iOS Tutorial Team Member
 
Posts: 27
Joined: Thu Jan 09, 2014 2:54 am
Has thanked: 1 time
Been thanked: 5 times

Postby Bellovic » Wed Jun 04, 2014 8:08 am

Very nice intro- Thanks! So when are you writing "Effective Swift"? ;)
Bellovic
n00b
 
Posts: 1
Joined: Fri Sep 13, 2013 6:17 pm
Has thanked: 0 time
Been thanked: 0 time

Postby MitrophD » Wed Jun 04, 2014 9:14 am

Thank you!
MitrophD
n00b
 
Posts: 2
Joined: Sat Feb 15, 2014 5:13 pm
Has thanked: 0 time
Been thanked: 0 time

Postby ottogutierrez » Wed Jun 04, 2014 9:55 am

Hello!

Thanks for the article it is a great insight to the Swift language. Just a question, in the strings section, you use IF with a string I guess for checking that is not zero or something, but in the book (from Apple) they say that it is incorrect to do this and show the following snippet:

“if let name = optionalName {
greeting = "Hello, \(name)"
}”

Excerpt From: Inc, Apple. “The Swift Programming Language.” Apple Inc., 2014-05-27T07:00:00Z. iBooks.
This material may be protected by copyright.
-----------------------------------------

Is this true or is it an exception?

Thanks!
Otto
ottogutierrez
Hacker
 
Posts: 10
Joined: Thu Oct 31, 2013 2:24 am
Has thanked: 0 time
Been thanked: 0 time

Postby xnorax » Wed Jun 04, 2014 10:58 am

it seems a lot more easier! Thank you!
xnorax
n00b
 
Posts: 3
Joined: Sun Jul 28, 2013 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Postby mongiie » Wed Jun 04, 2014 11:20 am

I just bought a iOS Developer Program Membership because of Swift! I can't wait for some tutorials to come out using swift! I don't know too much about programming (however I do know some Visual Basic), but I will read that book and wait for tutorials!
mongiie
n00b
 
Posts: 2
Joined: Wed Oct 30, 2013 11:13 am
Has thanked: 0 time
Been thanked: 0 time

Postby Aris.Sarris » Wed Jun 04, 2014 12:43 pm

Great post!
Since you mentioned the changes in the switch statement, might as well mention the fallthrough statement, which does the opposite of break!
Aris.Sarris
n00b
 
Posts: 1
Joined: Wed Jun 04, 2014 12:40 pm
Has thanked: 0 time
Been thanked: 0 time

Postby douglaslondrina » Wed Jun 04, 2014 3:29 pm

Very nice article, thank you. Hope you make more :)
Could you explain more about the conditional switch case? Why you need to "let ii" there?
Thanks again.
douglaslondrina
n00b
 
Posts: 1
Joined: Wed Jun 04, 2014 3:26 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Official Tutorials

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests