This is just a thought now, but I wonder how hard it would be to use the Mono Compiler or write a new one while still displaying the Windows EXE?
The reason for this thought is that I see that people "abuse" the C # language and get some things creatively, such as code contracts or aspect-oriented programming, and sometimes it seems that people are stretched too much.
The good thing about .net is that in the end, all we want is a valid IL for the .net 2.0 CLR. However, the Microsoft C # compiler is closed and cannot be extended. Mixing different languages is possible only in different assemblies.
The thought (warning: may sound awful) is to use a compiler that can be expanded and run as a kind of preprocessor. Thus, it would be possible to add new concepts of keywords and languages, while maintaining a valid IL.
The obvious drawback is, of course, that a) it is not C #, but C # is a deficit that no one understands, b) it is difficult to write a compiler, since many rules must be respected to maintain high quality and logical syntax.
But, as said, this is just a thought. This is a bit in the same direction as Mono.Cecil, but a completely different approach.
source share