Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Workshop 137 Q&A Q. What are the advantages of using declared properties? A. By automatically creating accessors that you can use with dot syntax, the instance variables are more securely encapsulated. In addition, attributes of declared properties let you set more than just the type of the property; you can control its writability as well as features such as memory management. Q. What are the advantages of using dot syntax with declared properties? A. You may have less typing to do because you can use the synthesized accessors. In addition, it can make your code more readable. Workshop