C # The user seems to want C # to be compiled as a local machine code like C ++. If C # can be compiled as a machine code, it can do as follows: 1. Efficiency improvement can replace C ++. 2. decompilation. Of course, Microsoft is not allowed to do so in consideration of commercial interests. However, many people are still trying this tough task. After C # is converted to native code, it can be considered as C # To C ++ code. C # itself learns C ++, so most syntaxes can be directly converted into C ++ code. The main problem is that the C # Runtime Library is hard to be transplanted to C ++. 1. C ++ does not have a GC library. This can be replaced by an open source GC library. 2. C ++ does not have a dynamic type loader. This can automatically generate some static methods to call. 3. C ++ does not have other. net tool libraries. In theory, you can compile the open-source C # Open-source library of Microsoft into C ++ and then directly call it. Therefore, in theory, compiling C # As a native machine code is completely feasible, but this is a large project. This is an open-source C # To C ++ project. Http://makesharppwn.codeplex.com/, tested, can now convert part of the Code and also belongs to the toy level. I believe that a language with high development efficiency and comparable performance to C ++ is still very demanding. It may have copyright issues with the C # compiler. It is better to create a new language that is close to C.
The following are the goals of my new language. If you are interested in cooperation, click:
Https://github.com/xuld/Tea/wiki/Tea-%E8%AF%AD%E8%A8%80%E5%BC%80%E5%8F%91%E5%AF%BB%E5%90%88%E4%BD%9C