Build a Vending Machine App - Part 2
Yes, the momentum continues! Today I'm planning on completing the rest of this course! I'm sure there'll be more new content along the way, which is a good thing! Even though I'll probably stumble along the way, it's the best way to learn. I'm not deliberately writing in platitudes; I just want to make it clear in my head that I don't want to come undone today. Anyway, last time I started this course by writing code involving protocols, enums, classes and structs - a real combination of what I've learned. Here we go! Type Casting The first thing Pasan says is that we're moving away from the project to do some code in a playground....good to be mixing this up - not using one entirely and not the other. So arrays can only contain one type, however in the example I've copied into playground he mentions this is (deliberately) not the case. They have a common base type. Swift converts/casts each object to a base type to make it homogenous. D...