Swift Clips: First class functions

preview_player
Показать описание
Swift Clips is a new series of shorter videos showcasing interesting and useful Swift tips and techniques. In this first episode we'll take a look at first class functions, which is a language feature that enables us to use functions in really powerful ways.

Рекомендации по теме
Комментарии
Автор

Amazing! This series is exactly what the iOS world needs. Short, concise, with good explanations and examples. Can't wait for the next to come. Thank you John!

MrGamer
Автор

Great first video! Looking forward to more :) Thanks for being such a helpful community member

pasta
Автор

Great video John! It's great to have access in video format to your advanced concepts. Thanks and congrats!

TheJhuerta
Автор

Been following John Sundell on his podcast for a while now and, as usual, this is very much like his other work: very informative and easy to follow. Good luck for this new adventure, John!

TiagoAlves
Автор

Like always, you made a great job !
Thanks John.

MiKo-bhyw
Автор

Awesome first video, John! I really liked your example of the productManager, that can improve codebases quite a lot. :)

johannbehrens
Автор

More advanced stuff please! Geared towards the future SwiftUI :D

yixe
Автор

Nice!! Good luck on your new journey 👍

huyong
Автор

Wow passing `<` into the sorted function .... mind blown. Thats awesome. Thanks @johnsundell

rixantos
Автор

Awesome video! But why did you name it `combine(_, with:)` rather than `apply(_, to:)`?

nicolasdegen
Автор

Hey John, It was a great video. I really like your coding style and how you do more work with lesser code!
I came up with a question about the last section of the video. Does the "combine(:with:)" method capture the value of the product property when the handler is called? or at the time when the "viewDidLoad()" is running? Can you explain it to me?

mralirezaaaaa
Автор

Correct me if I'm wrong, but in the resulting example shouldn't it be self.productmanager as it was in the original example. And if yes, won't that cause a retain cycle?

MrSonuvru
Автор

This is pretty good. One comment I have is that you lightly touched on it at the end but it is very bad to pass self.startCheckout into that combine as that would be a retain cycle.

joeygentry
Автор

Finally after 10th viewing I was able to understand the logics... I am iOS dev with > 4 years experience :|

MrTalhakhan
Автор

Wow! It is really mindblowing to see how elegant Swift code can look. It takes some time to get used to it, for a Java developer, code like array.sorted(by: <) looks not very understandable :-)

dimiutube