First, a few definitions. They are not necessarily important to the
question, but they are important to understand the process. The "language"
is IL, for Intermediate Language or MSIL for Microsoft Intermediate
Language. It is considered compiled, as it can be picked up by the CLR and
run without any further "outside" intervention. If it still required more
intervention from a user, it would only be translated.
The main reason someone builds a compiler rather than a translator is to
build running code. Technically, you could build a translator and then fire
off a compiler, but you then have to trust the other compiler. If you write
in C#, C++ or VB, you will find the compilers are each better at something
different. They are functionally equivalent, but not exactly equal in their
IL output.
As a software developer, you would prefer something where you have left your
destiny under your own control, rather than partially under your control and
partially under the control of another piece of software. This is if your
goal is compilation. You also prefer the least number of moving parts, as
more moving parts means more potential points of failure.
There is certainly value in translating one high level language to another.
It is completely different from compiling.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"ajk" <an******@gmail.comwrote in message
news:65**********************************@s28g2000 prd.googlegroups.com...
Hi
When doing a .NET compiler what are the benefits of generating ILAsm
directly compared to generating another higher level language like C#
first and then using the C# compiler?
Round-tripping will not work and debugging may be easier, any other
reasons why it would be prefered to generate ILAsm?
tia/ajk