托管代码的优点-------外文翻译.doc

约14页DOC格式手机打开展开

托管代码的优点-------外文翻译,advantages of managed codemicrosoft intermediate language shares with java byte code the idea that it is a low-level language with a simple syntax (based on num...
编号:16-212213大小:51.50K
分类: 论文>外文翻译

内容介绍

此文档由会员 wanli1988go 发布

Advantages of Managed Code
Microsoft intermediate language shares with Java byte code the idea that it is a low-level language with a simple syntax (based on numeric codes rather than text), which can be very quickly translated into native machine code. Having this well-defined universal syntax for code has significant advantages.
Platform independence
First, it means that the same file containing byte code instructions can be placed on any platform; at runtime the final stage of compilation can then be easily accomplished so that the code will run on that particular platform. In other words, by compiling to IL we obtain platform independence for .NET, in much the same way as compiling to Java byte code gives Java platform independence.
You should note that the platform independence of .NET is only theoretical at present because, at the time of writing, a complete implementation of .NET is only available for Windows. However, there is a partial implementation available (see for example the Mono project, an effort to create an open source implementation of .NET, at www.go-mono.com/).



托管代码的优点
Microsoft中间语言与Java字节代码共享一种理念:它们都是一种低级语言,语法很简单(使用数字代码,而不是文本代码),可以非常快速地转换为内部机器码。对于代码来说,这种精心设计的通用语法,有很大的优点。
1. 平台无关性
首先,这意味着包含字节代码指令的同一个文件可以放在任一个平台中,运行时编译过程的最后阶段可以很容易完成,这样代码就可以运行在该特定的平台上。也就是说编译为中间语言就可以获得.NET平台无关性,这与编译为Java字节代码就会得到Java平台无关性是一样的。
注意.NET的平台无关性目前只是一种可能,因为在编写本书时,.NET只能用于Windows平台,但人们正在积极准备,使它可以用于其他平台(参见Mono项目,它用于创建.NET的开放源代码的实现,参见http://www.go-mono.com/)。