Comments on vcmfcatl

Source: Internet
Author: User

I wanted to write an article about the comments on VC, MFC, and ATL for a long time.ArticleBut I think this article, which is easy to cause controversy, is actually a waste of time. It is better to do some practical work. But now ChinaProgramThe idea of the member group has reached a very dangerous level. In the last few computer reports, several 14-year-olds posted, and just learned to write a few programs, you can name VC as your dream. when I was looking for a job last year, I was asked by several companies whether I would be VC. After I got my answer, they could not believe that I had been studying C for four years and C ++ for more than two years, I also used "free" Time to learn Java and Perl. A person who dared to write "C ++ master" in the "expertise" column, actually, I only "have a slight understanding" of VC. I can see from their table that I don't think: "Do you dare say you understand C ++? Do you still have time to learn other things? Not even VC, Where can the level be higher ?" I didn't bother explaining to them that the world outside VC is even more exciting, because I have been paying attention to the word STL before. It is a kind of indifference, indifference, and indifference. Everything is very clear, and the explanation is futile. They do not know that there is C ++ outside the VC.

Of course, if you don't have to worry about it, I finally found a satisfactory job. However, this kind of experience has touched me a lot, because I already deeply feel that when our Chinese programmers have a chance to face the whole world with a pair of open eyes, our thoughts were quickly closed up. A giant called Microsoft drew a big circle in our thoughts with a huge circle and said to us, "the sky is so high, the Earth is so big, enjoy it!" Life in the Garden of Eden is quick, but when all of us are firmly limited within a range to listen to the rules of God, I can't see our own future, or even the meaning of our own existence.

Not free, do not die!

Of course, our capabilities are limited. In a long period of time, the boundaries we can reach will be far less than the boundaries opened by pioneers. But I am sure that, now, our capabilities can at least break through the world that Microsoft has defined for us. Microsoft is good. She is considerate and outstanding. However, either Microsoft or great softwares, there is no Caesar in the hearts of our programmers. We can treat you as friends, but you don't want to be our masters! We must go out. Although we know that the limit exists, we cannot surpass our predecessors for a long time, but we must go out. We can stop on the road of exploration because we are exhausted, but we must not hold down in front of the artificially set fence.

C ++ is my favorite language. I am willing to spend my whole life on her. VC is also a good thing. In Windows, my favorite C ++ editor. MFC/ATL are also good things. If they are needed in the future, I will study them carefully. However, the world in my heart is much wider than this. The language performance set and standard library defined by standard C ++ are more beautiful scenery; the dawn of the general programming era brought by STL is even more fascinating to me. The design patterns are exquisite and consistent, and the new clues of the model-oriented programming paradigm are emerging. the maturity and great hope of object-oriented software engineering are as follows, tao/ace is huge and exquisite, And we Chinese people's own C ** language is thrilling ,..., there are too many treasure that I can't cover. Although I have only a small part of what I can come into contact with, although in this process I am more deeply aware of my level is not worth mentioning, but I can already claim that: the world outside is wonderful!

I know that we still live in the real world, and spiritual happiness is not enough to fill in our hunger. But now we are talking about C ++! Think about why VB, Java, and Delphi, which are simpler and more profitable, but consider the hard-to-learn VC as your ideal? Isn't it Because VC can give you freedom, self-confidence, and pride? If you realize that VC is also a bigger wall, why don't you want to rush out and gain greater freedom, self-confidence, and pride?

B. stroustrup said: "I want to learn about C ++ to solve ground-breaking problems, rather than repeatedly solving problems with mature frameworks and ready-made solutions." C ++ is the pioneer's language, the thinker's language, and the language above the "master" level. Perhaps in terms of practicality and simplicity, many languages will constantly surpass it now and in the future. However, I believe that for a long period of time, there will be no language beyond the field of constructing and expressing software engineering ideas and creative software development. In other words, programmers who are proficient in the C ++ language and their thoughts are far beyond those of other language users in terms of depth of thinking and comprehension of new technologies, we should probably call this a programmer's thinker. Because of this, I think that being restricted in the VC circle is not tolerable by a C ++ programmer.

I think, as a real C ++ programmer and a free thinker, we should have a kind of kindness. Don't get stuck with the arguments about who is better than C ++ and Java all day long. Don't despise a software that uses VB, let alone refuse to learn other languages. C ++ is hard to learn and use, and far from the application layer. We should be frank about these issues and make some efforts to change these situations if possible. We should actively encourage the mixed use of other languages and C ++ to make C ++ a solid support behind them. I am not the boss of the company, but I feel that if my company can have such a level of programmers, I will be proud of my own business and will give him the highest salary.

Appendix:
I personally think that the defects in MFC implementation:
MFC was finalized at the end of the 89 s and in the early 1990s S. At that time, C ++ was still very imperfect. At that time, MFC was quite advanced. However, since then, C ++ has undergone (or can be said to be) a revolutionary huge change. Compared with the new C ++, the system structure and implementation mechanism of MFC are relatively backward, many excellent C ++ features have not been properly applied. Instead, they have made another discussion on their own. In addition, the language VC is becoming more and more different from C ++. It is completely tailored for Microsoft's own applications, and even does not hesitate to violate the standards. (However, compilation technology, especially optimization technology, is indeed unmatched)

I am not satisfied with the disadvantages of MFC:
1. A large number of odd macros are used, and the Code is not exactly the same. I really admire some people who analyze them with patience.
2. the implementation mechanism of message ing is very clumsy. I can understand it without inheriting, but why should I use a table driver instead of delegation? The code is not exactly the same.
3. the encapsulation of the underlying SDK is too thin, and the object-oriented experience is insufficient. (Of course, it also has its advantages, but after all, this is
C ++ !)
4. I made some things like rtti, Seh, cstring, and cobjxxx (container) on my own, but the implementation is not very good. I can understand it a few years ago, but now it is completely outdated.
5. in many cases, it is a place where the standard library can show its skills. MFC is useless.
6. in order to cater to MFC, many compilers violate standards.
7. the limitations of the DOC/view system are difficult to break through.
In other words, MFC is still a set of excellent tools. but now it has actually become a threat to C ++ programmers in China. It attracts too much energy and resources to the branches, and turns a blind eye to the real good things on the main roads. I tried to offend a large number of people and wrote the above article. as I said at the beginning, I have always thought that endless debate is an empty talk about the country by mistake. I have already said something that everyone can criticize and discuss, but I will probably not return to this topic any more.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.