C ++ inseparable night ---- I learn C ++'s heart course

zhaozj2021-02-16  56

C inseparable night ---- I learn C 's heart course

Because of some of your posts online, everyone has attracted everyone on C learning and use, and then recalls that he has been in contact with C for more than three years. A long-distance courage to start again, now I have a few more. Feeling, more is that the process of learning is quite universal. I want to write some of my own experiences. I have a summary and review for myself. I can't talk to help, but I believe it can learn C . Case analysis. But it is always too pursuit of perfection, but I want to write all things, but I have given up all things and several times, I finally dismiss this idea of ​​"perfect", wait a minute and you want to Friends call, how much is it to say? After all, I have written it.

Contact C is in 1999, then he already had some C language foundation. The keyword that I have just started was more than Class. At that time, I learned VC , I wrote it. Several very simple gaming programs, then because many trivial things have more deep in C , this is also very regrettable now, maybe I can invest in that time, it should be very small now. .

In 2002, a new mileage was started, I have sufficient to give time. In the summer of that year, I started a new C study. I know that my previous foundation for learning C , I have almost no more help, so I chose to start, from if ... .else The syntax begins. The first book selected was "C Primer", who had given friends, I just saw it less than three days, I didn't continue to see, I know this book is very good, but I am not suitable for at the time, because There are too many things from the beginning to the confusion, class, template, overload ... so this is almost let me give up learning C , because I feel that I still have a certain skill, just put C I am also a good choice at that time, but after all, the connotation of C can't let me have more passion. Repeating things I will never like it. Then I start thinking about two languages ​​unique indication differences I contained? At the same time, I began to consider what is the main programming language? Subsequently, I borrowed this book "The concept and realization of the program design language", no matter how others look at this book but it makes me understand a lot, because the biggest feature of this book is abstract modern programming language. The various semantics and the idea of ​​it, let me have a more profound understanding of the language itself, let me establish a different grammatical representative of various languages, and achieve a semantics that have all languages. A logically semantic series reflects more general programming ideas. After this concept, I came into contact with "C Design and Evolution" book, this book is the greatest in learning from the C process, this book makes me understand C design concept and various The semantics representative represented by the language facilities, both of which are both C language features to achieve some function and are established on the basis of non-violation of C design philosophy. Such a macro foundation for C , let me benefit the future in the future, and "C Design and Evolution" This book also has two English version, whenever I have a lot of confusion about C characteristics. I will put the English version (casually show off, this book has the bs' personal signature :)) Take it out, take a good look. Just like the study of C , it is quite discussion. I will take this book again, and I evaluate whether the views you hold are correct. Since then, I think I am going into the correct road to learn C .

In October, BS came to China, at that time, I was only a complete beginner for C (huh, I gave you an example. At that time, I met Cber in Hangzhou. He began to tell me his net name. I said you. What is the name? Later, he wrote his name and contact. I still don't know that I stand it opposite is a C top master. I am fortunate to take a photo with him at that time. This is more wise. Place, at least no regret.) Although I am an initiator, I don't think I should miss this opportunity to contact this time (especially after repeated reading, after reading his book and most of the the theses), come from To Hangzhou (actually spent a lot of merchants) :)) Listening to the report of BS in Zhejiang University, I have been going, sitting in the first row, the entire report will be my first question, recall My question is timely naive, but I told myself whether I am now, this opportunity will not have it, so I have always maintained very positive, BS's reply is very detailed, it is basically in detail. The state of false listening: "But the master's style of the BS made me upside down, and I will no longer be utilitarily for C . Learning is accumulating, I have seen "C Programming Thought", and I have a more sensibility to C . I will take out "C Pirmer" again after three months. At this time, I can very much understand the classic masterpiece of Lippman. With heart, it is absolutely not to see for beginners, but for the complete study and understanding of C after entering the door, it is very obvious, from the beginning of the book, directly enter the C theme, and the previous five chapters are designed with a data structure. Let the readers fully understand the abstract capabilities represented by various user-defined types, and then directly enter the container class in Chapter 6 Standard Library, such design makes readers very clearly to build containers and classes of these two C important concepts. After that, the learning is naturally very satisfying. The experience of previous learning and programming told me that writing procedures is the center of learning, so I will debug most of "C Primer", the code coherence is the biggest feature of this book, and Another major feature is that there is no one that can pass directly, it requires your own debug, and deepened my more C in the process of debugging. In less than two months, I saw "C Primer" once, plus the exchange of 9CBS and everyone, I have established a complete basic understanding of C .

Haven't seen the "C programming language", is it to learn C ? In my eyes, if you haven't read it, how do you understand this language? In December last year, I spent a whole month two times, the only feeling is that this book is really qualified to be called "C Programming Thoughts". Books and "C Primer" are completely different styles, which tells you the full C syntax and its supported semantics. The former is truly telling you how to use C to think about problems and write code compliant with C design concept. You can understand the program design ideas and code preparation specification for C design ideas. In New Year's Day this year, I feel that I have made it a lot of progress, so I didn't continue to read the book, but I saw a few large-scale C program source code in the winter vacation.

After that, I also read some works of C , and what I needed here is "C Standard Library" and "C Shen Shu", the former writing mode is easy to understand, but the content of the book is very rich, for the study standard library It can be said that it is the best performance. Later, reading sensation and "C programming language", very strong ideological, very tired of reading such a book, brain must have been thinking about the problem, thinking about the issues of the author and his proposed solution. The biggest feature of this book is to expose the core of the C language - the three abstract models and extreme language facilities themselves support these three abstract models. What is the deeper thinking of "C Shen Shu" to me is the most reasonable way to use C , which is later I post for the source of some insights for C learning and use. Later, I slowly realized some small procedures with C , some is on the book, some is what I think, write procedures and debugging the process given to me is that the troubles and satisfaction process may be such a repeated process. Programmer pursues. In this article, most of the records have recorded their own history. I believe that there is nothing help to read them here. I will talk about my own learning C feelings. From the front my experience, I can see it. Not a master, but I guarantee that something I have written below is very helpful for beginner C . After all, I have just got through the gray days of the time.

Learn C focus on understanding the semantics represented by its various language facilities, as well as the design idea representing the semantics they can expressed by C . First start from macro, you need to understand that C is the essence of programming language. Here I write C most important nature: C is a static type check, based on C memory mode, support four basic programming models. Note that three essential characteristics are described, static illustrate the type check nature of the language, telling us that all the operations related to memory in C need to be responsible, so that many design programs have brought a lot of design programs Where you need to pay attention, it is understood that the four basic models supported are the basis for understanding various language facilities. Then remember the biggest design philosophy of C , which is also an essence of the application C . I cited a sentence in the "C Primer" Chinese version of the preface - "C foundation is a variety of facilities, they allow users to pass Define new data types to extend the language itself, these new types can be used as the built-in type (how to understand this sentence is key, my understanding is: User defined type can be used as its replacement when using the built-in type The user defined type can be declared like a built-in type, which can be initialized, can be copied to each other, can be used with many operators like a built-in type object, which can be passed to a function as a parameter, As the return value of the function, it can be used as an operation object of the container, and the user-defined type can be used as a template as a template as a built-in type. (Which facilities are to allow the user to define the type as the built-in type, as convenient, including the facility, including What is the first step in constructive, copy, deconstruction functions, operational secondary overload ....., is to understand the basic language (what is the basic language? It is C Better C part).

Here, I still want to make a very important concept: the most essential thing in a language is its type system, any language has its own unique type system, learning C is learning his type system. So first, you need to thorough understand what is the concept of data type. So your ideas are clear, you have selected, learn from each C support design. Structured design ----- is also the Better C part in C , you need to overload and reference these two most important languages ​​on the basis of C.

Object-based - you need to build C most powerful concepts - class, which is the user-defined type, which is actually the concept of abstract data types in the data structure, and a series of language measures for reasonable constructing classes. And always remember that the design is used in C to indicate the concept we need to represent. Class is also the core concept in the C abstract mechanism.

Object-oriented - here you need to know the OO concepts such as inheritance and polymorphism, as well as such common design technology such as the handle, here you need to understand that you started to enter the interface programming. At the same time, you have to learn OO thinking, and some of C facilities are just sufficiently expressed in the semantics supported by OO thinking. However, here, you need to understand that the Semantics expressed by C is limited by its original language design principles (what principles? Static type check, not pay for unwanted things, the option is in the hands of the programmer itself To force programmers to make a choice, that is, the OO idea that C can represent can be called OO thinking with C features. Which of this OO thinking and the pure OO represented by Java? Didn't contrast, because their own design concept is different.

Wild design ---- Here you need to understand the most important thing is that the C TemLate mechanism is what the original intention is what the original intention is, now the true meaning of his representation is: This understands the core of genericity - the specificity of various types as an abstract condition, can C measures to define abstract conditions? No, this condition can only be defined in our own heart, but we can use the type of avatar as an abstract condition to be realized in the template mechanism, so that TemPalte will become further more further than the type derivation mechanism, that is Abstract conditions derived. That is, we no longer see the parameters accepted by the template as a type, but to regard the template as a mechanism to accept abstract conditions, regardless of its type, as long as this type meets the abstract conditions accepted by TemPalte. As a parameter, it means a generic thought ----- type is no longer fundamental, abstract condition is that the type is just an abstract condition of the outer garment and implementation in C . Industrial products that are technically born in combination with object and generic design patterns --- STL.

Finally, some ideas, C as a computer programming language that supports a variety of design models, and its implicit thoughts can be well profound, proficient in mastering is not easy, and the proficiency is more difficult as the sky, but like C start design. Your place you don't know about C does not hinder you to use C and use C to make a reasonable design within your strength. But we should understand that we should jump out to a higher place, stand in a higher place to re-examine C , re-examine your language, and even doing the understanding of the software in the form of constant progress ? For C , you can't be an excuse to ignore other technologies. In short, in the face of new things we have, we have to have our own judgment, too floating is what we are not shameful, but the road to grow will never So stepped self-sealing, do the frog in the bottom. Here, I finally completed this imperfect summary. If you can have it to help you, or even if you have no help, you also think that there is no waste just watching this article, I think my purpose has been reached. Thank you for reading, my girlfriend has been waiting: ", I will stop.

Amstrongest

21:40

05/14/03

转载请注明原文地址:https://www.9cbs.com/read-25350.html

New Post(0)