Named Objects vs Objects created “on the fly”



In Swift Playgrounds it is shown how to create e.g. an Object as an Instance of a Class like: let gem =  Gem() giving the object a name or create an Instance “on the fly” like:, atColumn: 2, row: 5). The first Object created with a name can be used by using its name and its properties and methods. But how is the Object used being created “on the fly” when there is not name for that Object?


Hope above stated makes sense?




Powered by WPeMatico


You may also like...

Comments are closed.