Swift Programming Language Tutorial Part 6 (Closures)

preview_player
Показать описание
@SkipAllMighty
Best viewed in 4k!
Leave comments on any errata
Covering:
Closures 0:00
Рекомендации по теме
Комментарии
Автор

With Beta6, in order to recreate the shorthand example I had to use sorted() instead of sort() because sort() requires a reference. 

jaydoug
Автор

Just found your series of tutorials and really loving them! Really really appreciate the work you've put into them and really appreciate you putting them out for free. This tutorial on Closures (although me being unfamiliar with them) really explains how they work in both simple examples as well as more complex and abstract situations. Again, well done!

MichaelNinoEvensen
Автор

I just downloaded the public beta for Yosemite.  Great series of videos and it is really helping me dive straight in with Swift

dominicwindle
Автор

I am very impressed! Thanks a lot for the explanation. Great presenting!

PanjuTorials
Автор

Skip Wilson you taught me all the way swift very easily. Thank you so much.

kollinarasimhaiahnarasimha
Автор

very useful.. lot of interesting concepts, not only the closures (which were particularly quite confusing to a beginner in swift like me). Thanks!!

kasterk
Автор

Jim and Pam!
Ah... I see what you did there
really miss the office

Автор

Like your tutorials very much ! Good explanations, always starting at a basic point, as a German, I do understand your English pretty well. Thanks a lot ! Greetings from the capital for beer drinkers, Munich !

RobertHolzapfel
Автор

Skip, this tutorial is really good, but I sometimes really struggle to apply these somewhat 'made up' examples, and applying them to real code. Could you maybe make a 'real world' example with closures? Maybe implement it in the blog / database tutorial series you are doing? Keep up the good work! - Chris

ChristofferBuusmann
Автор

I get a better understanding of closure. Thanks!

kaifujhuang
Автор

Thank you Mr. Wilson. The Tutorial is good. But I am not sure if closures are a good thing. From this, i could see that they can lead easily to code, that´s hard to read and they can cause problems, like the reference-cycle. That would be acceptable, if I could see what they are good for. But I couldn´t. What do they help me to do, that I couldn´t do with functions or classes, without trapping a lot of coders into bad code? (I look at this as a great demonstration of how short, dense and implicit code leads to unreadability)

jensBendig
Автор

Great job Wilson. Thanks! Unfortunately, I can not find information on SpriteKit, SKScene, skView.presentScene(scene) and addChild(). Will there be a lesson with these issues?

gromixzeloslaw
Автор

Thanks for the great video but why are you doing this at 5 AM?

kevenzhao
Автор

Any plans for a video about database? SqlLite? thx

iglooovideos
Автор

Also, one last question. I still can't understand this:
if let SomePlanet = PlanetV3.fromRaw(pos)
The exact part is when this is done: if let SomePlanet = (Something).
I think i've seen it in loops and others, but it doesn't make sense. So your making a new variable and making it equal(Not checking if it is equal since that would require two == signs right?) to whatever is on the right side of the statement. And then their is the if statement. 

MCAInsurancenetwork
Автор

Hi.

I still don't understand what the .map function does, i've taken a look at the ebook and watched this video. I know its some kind of Closure but i just can't get a grasp on it.

MCAInsurancenetwork
Автор

Hi Skip.. I'm having trouble with the sort() array function in Xcode 8.2. It seems it has been removed from the Swift general function list. Do you know how I would fix this issue? Thanks for your time.

Andrew

andrewwertheim
Автор

Hey skip nice tutorials. I have a small problem in 21:46 mins the code  var returnString:String = digtNames[number]!  shows an error ( '()' -> int does not have a member named 'subscript')  please help 

balasubramaniamniland
Автор

@Skip Wilson we wanted tutorial on Core Data with Swift

kollinarasimhaiahnarasimha
Автор

Hello. As always, great stuff! Quick question. Why can't we use the shorted version of the hasPrefixAndSuffix closure like that:

var hasPrefixSuffix: (String, String, String) -> Bool
hasPrefixSuffix = { $0.hasPrefix($1) && $0.hasSuffix($2) ? true : false }
or
hasPrefixSuffix = { $0.hasPrefix($1) && $0.hasSuffix($2) }
 
gives me an error, saying that $2 is used before it is declared. bummer.

ArseniyIvanov_The_Jabbson