[Objective C #4.0] Chapter 3 use C # to express your design
Luo chaohui (http://www.cnblogs.com/kesalin)
Question: The Chinese translation version of [negative C #] is already available on the Internet, and the Chinese version is also published, but the content is old, not the latest version (C #4.0). This is my translation of this system.ArticleOne of the reasons is that although I am garbled about C/C ++, Java, and objective-C for a few years, I am a newbie in C #. I translated this series of articles while translating them.Cause2. As a newbie, mistakes are inevitable. please correct me. Copyright statement:[Translation into Objective C #4.0] the series of translation articles are only for learning and hobbies,Follow"Signature-non-commercial use-consistent"Create a public agreement, please support genuine English.
Chapter 3 use C # to express your design
Beginners try to communicate in a foreign language (human language. They learn words and can piece them together to express their opinions. During the transition from a beginner to a language expert, they began to use the appropriate idioms in this foreign language. In this way, the foreign language is no longer so "external", and they start to be more effective and clear about the foreign language.Programming LanguageThis is also true. The technology you choose enables your design intent to communicate with developers who maintain, expand, or use the software you develop. C # types survive in the. NET environment, which makes some assumptions about the capabilities of all types. If you violate these assumptions, you will increase the possibility that the type cannot work correctly.
These terms in this chapter are not a summary of the published software design technology. On the contrary, these terms clearly show how different C # language features best express your software design intent. C # Language designers have added some language features to better express modern design practices. There are only minor differences between specific language features. You usually have many alternatives to choose from. There may be more than one optimal alternative at the beginning, but when you find that you must improve the existingProgramThis difference begins to show off. Make sure that you understand these terms well and apply them carefully when the system you are building requires improvement.
Some syntactic changes provide you with new words to describe your daily usage. For example, properties, indexers, events, and delegates. Different class and interface: class definition type, interface declaration behavior; the base class declarative type and defines common behavior for a group of related classes. Some other design usages are changed by the garbage collector, and some are changed because most of the variables are of reference type.
These suggestions in this chapter help you select the most natural expression for your design, which allows you to create software that is easy to maintain, expand, and use.