Swift Defer Statements and Programming with Emojis (CartoonSmart Video Tutorial Podcast Episode 23)

134 views · Published 20 May 2016 · 18:08 · Indexed 27 October 2026

Channel: cartoonsmart · 2016 · Education

Watch on YouTube

Time to learn about defer statements! This chunk of code runs in functions marked with the throws option, regardless of whether or not an error occurs. Heck , here's what the official docs say... Use defer to write a block of code that is always executed before a function returns, regardless of whether an error was thrown. You can use defer even when there is no error handling, to simplify functions that can return from several different places. Yeah, so that. We also have some fun programming with emojis! 

Subscribe to our podcast on iTunes or through your favorite RSS reader at Cartoonsmart.com/podcasts or check out our more serious tutorials by visiting the main page at CartoonSmart.com

More from this channel