| This is my first screencast! I had a lot of fun making it, and I hope you enjoy it. One of my favorite parts of Swift is the optional concept, which separates variables which are never null from variables that can sometimes be null. This helps prevent errors from trying to use objects that don't exist. The syntax involves `!` and `?` which can make your code seem excited and confused, but it's definitely a step toward making your code safer! For example, say you have a UI element that might have a label. If indeed it has a label, and you wanted to set the color of it to red, you can store your label like this: `var label: UILabel?` which signals that it may not exist. Then to set the color, you would do this: `label?.textColor = UIColor.redColor()` The question mark says if it isn't there, then don't assign the new color. We don't need to check the case where the label does not exist because Swift automatically does it for us! |
While I do not have time to go over the whole video, surely you could have come up with much more serious reasons why Swift might be preferable to Objective C than "uhm, it has no namespaces and looks strange". Also, there were no reasons why "not to use Swift [yet]", making sure to mention the terrible state the developer tools are at this point, as well as many many missing language features and other quirks which make it a language not yet ready, in my experienced opinion, for large projects, or when some C/C++ operability is required.
Have fun coding and making tutorials!