DOTNET是否为所有语言提供了通用API? [英] Is DOTNET provides a common API to all languages ?

查看:109
本文介绍了DOTNET是否为所有语言提供了通用API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DOTNET是否为所有语言提供了通用API?

Is DOTNET provides a common API to all languages ?

推荐答案

该框架为多种语言提供了通用运行时-请参见http://www.dotnetpowered.com/languages.aspx [ ^ ].
The framework provides a common runtime to many languages - see http://www.dotnetpowered.com/languages.aspx[^].


是的,这是.NET的核心设计目标之一. Microsoft开发了一个称为公共语言基础结构(CLI)"的开放规范,而.NET框架(尤其是CLR)是CLI的特定实现. Mono也是CLI的实现(来自其他供应商).核心思想是所有CLI语言都可以使用通用的API,并且可以轻松地互操作.实际上,并非所有语言都实现所有CLI功能,因此最终会有一些例外,其中语言互操作可能并不顺利.要解决此问题,有一个CLI子集,称为CLS-公共语言规范.符合CLS的语言必须实现CLS(以及他们想要的任何其他CLI功能).只要符合CLS的语言仅使用CLS投诉功能,它就可以与任何其他符合CLS的语言顺利互操作. VB.NET和C#都是符合CLS的语言.
Yes, that was one of .NET''s core design goals. Microsoft developed an open spec called Common Language Infrastructure (CLI) and the .NET framework (in particular the CLR) is a specific implementation of the CLI. Mono is also a CLI implementation (from a different vendor). The core idea is that all CLI languages can use a common API and can easily interop with each other. Practically speaking, not all languages implement all CLI features, so eventually there are exceptions where language interop may not be smooth. To work around this, there is a sub set of the CLI called the CLS - Common Language Specification. CLS compliant languages must implement the CLS (plus any other CLI features they want to). As long as a CLS compliant language uses only CLS complaint features, then it can smoothly interop with any other CLS compliant language. VB.NET and C# are both CLS compliant languages.


当然可以.对于所有.NET语言.

—SA
Yes of course. For all .NET languages.

—SA


这篇关于DOTNET是否为所有语言提供了通用API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆