Since cnblogs and csdn wrote several blog articles criticizing C #/. net, they have been repeatedly attacked by many. Net fans: http://www.cnblogs.com/topic/53 /. During this time, I was on a business trip. If I didn't reply in time, I was regarded as a poor man by some friends. In fact, as I said in my first blog post, since I have listed these arguments, there must be practical evidence and technical reasons to support them-maybe some ideas are wrong, but I always have my reasons. Let's talk about it and share it with you. If you don't reply in time, it's just the reason for your work. You will never be confused. Please rest assured that I will continue to fight. haha :)
I have carefully read the blog posts that have been involved in the "Group Competition" so far. To tell the truth, most of them are not technical and error-prone. For example, the following point of view: "transparent events and interfaces, how can they replace each other": http://www.cnblogs.com/waitrabbit/archive/2010/07/02/1769948.html blog directly said "events are a special commission "? At this level, we can still say completely ?". First, let's clarify what is "delegate", what is "interface", and what is "Event! Another example: 0 x fa in the complete hydrological series: bloated design philosophy behind the function: Compile. I will not respond.
However, fortunately, among the many watermarked posts, there are indeed several high-quality posts, which makes me very happy. It is also a reward for writing a series of blog posts. I have listed the following posts and added my response (if a friend thinks that his post is of high quality and has a deep technical level, I have omitted it, please reply in the following post and I will read it carefully and respond to it) to discuss and share with you:
1.Li Jianzhong metadataYes. netCore soul of the platform: Http://techvery.com/jzli/2010/07/07/metadatais the core soul of the -netplatform/
This blog is one of the most in-depth technical analysis posts I have seen, which has benefited me a lot. Li Jianzhong is a distinguished. Net Technical expert. I admit that learning. NET is the. NET Framework translated by Li Jianzhong.ProgramDesign (Jeffrey Richter, and later renamed CLR via C #). I also participated in the project last year by Mr. Li. NET Technology Conference, just a conversation with Jeffrey Richter mentioned above.
In this blog post, Li Jianzhong criticized an argument in my previous blog post ". NET platform metadata aims to support reflection ". I must confess that I have always thought that "metadata is created to support reflection ." After analysis by Li Jianzhong's blog, I admit that I am not aware of this issue, and my point of view is biased. He also agreed with Li Jianzhong's blog that ". Net's main purpose of using metadata is to achieve high reusability of components ".
Li Jianzhong has many valuable technical analyses in his blog, such as the disadvantages of COM. Why does. net use metadata? What specific applications does metadata have in. Net? In particular, the comparison between "Component reuse based on logical semantics" and "Component Reuse Based on physical implementation details" has benefited a lot.
Read this articleArticleLater, I also admitted that "Component reuse based on logical semantics" is very important for the software development platform, but I have to discuss it with Li Jianzhong. Isn't "performance doesn't matter ?", "Can. Net greatly sacrifice the performance of software for Component reuse based on logical semantics ?", I hope to hear further analysis from Li Jianzhong and netizens.
2. About. netReflection and metadataLoad --To jeffray ZhaoAnd firelong": Http://www.cnblogs.com/mikelij/archive/2010/07/04/1770897.html
This post on mikelij involves two points of view:
A. my opinion in the previous analysis: The program (EXE/DLL) is finally loaded to the memory for running, not the light on the hard disk-that's why.. net programs occupy a large amount of memory.
B. jeffray Zhao refuted my point in the previous article that "without JIT, the entire dll will not be loaded into the memory, but how much it will be loaded. This has been discussed many times"
Mikelij's meticulous analysis and data reasoning in this blog post, as well as the discussion with other netizens, have clearly indicated that my point of view on this issue is correct. However, many of the following posts have been saying that "the memory usage in the task manager is very small, so Lao Zhao's point of view is correct, that is, the method that is called will load the method and its metadata. The method is not used. Do not load ".
This involves a deep topic, that is, the memory loading rules of the Windows operating system and the Digital meaning of the Windows Task Manager. My response to this question is as follows:
The memory size displayed by the Windows Task Manager refers to the memory size used by the working set, that is, the memory size loaded into the CPU Cache during the current runtime. Not all data loaded into the memory during the program running. The data may stay in the primary storage or virtual memory, that is, the hard disk-this is the performance cost, because it will soon encounter page fault and cache missing problems due to calls. They are not currently called, so they are not stored in the working set cache, but they do not indicate they are not loaded into the master memory or virtual memory.
While the program is running, the entire assembly of EXE/DLL is loaded as a whole, rather than partial loading-not because you only use method A in an assembly, you only load method. Instead, other classes, methods, and metadata in the Assembly will be loaded: mikelij's blog fully proves this.
JIT compilation is based on methods-that is, the method to use and the method to compile. However, loading is based on a set of programs, rather than methods. Lao Zhao's understanding on this issue is disappointing.
Thank you! mikelij!
3.Old Zhao: I support hosting Runtime (virtual machines): Http://blog.zhaojie.me/2010/07/why-i-support-managed-runtime-virtual-machine-based-program.html
To be honest, Lao Zhao is right. A lot of net analysis is helpful. At least I can think about Some Problems in depth. Although Lao Zhao often makes some naive errors (such as loading the assembly in the previous section, obfuscated into JIT issues ). In this article, Lao Zhao talked about the advantages of several virtual machines. I agree on the whole, for example, implementing cross-language and cross-execution environments.
However, virtual machines can fully implement nativeCodeHigher performance is a bit too much. net. Especially the myth of inline optimization of a virtual function. Even if a virtual function is called cyclically, you cannot determine the next call address in advance-if you can, the cost of this judgment is much higher than the performance cost saved by the inner link (and it must be determined every time !). Is Lao Zhao actually implemented? Can I provide a reference address?
The native code can be optimized for virtual machines, and the optimization is far greater. But a lot of native can do optimization, and virtual machines won't. Virtual machines, as the name implies, need to go through an indirect layer. I can't imagine it in any way. Can the indirect layer improve performance? I hope Lao Zhao can analyze the principle in depth or give a case.