[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Cross Language Support

Definition - What does Cross Language Support mean?

Cross language support is the ability provided by the common language runtime (CLR) and the common language specification (CLS), of the .NET Framework, for interaction with code written in a different programming language.

Cross language support is a language interoperability feature with advantages, such as the reuse of types defined in other languages; a single environment for debugging and profiling, due to the use of Microsoft intermediate language (MSIL); and consistent exception handling, where exceptions thrown in one language can be caught in another language. Thus, it acts as a tool for code reuse and efficient development processing.

Implementation of cross language support in .NET is somewhat similar to that of Java. In case of .NET, the CLR converts the code generated in intermediate language (similar to Java bytecode) to machine-specific code. Thus, the CLR forms a common platform for cross language development, which includes cross language inheritance, cross language debugging, and cross-language exception handling.

Techopedia explains Cross Language Support

The increase in the variety of tools and technologies necessitated the requirement for language interoperability. The design of .NET aims to address the issues faced while using component object model (COM) components, where the type of client has to be considered before designing its interfaces. For scripting clients, the interface methods need to have automation-compatible parameters, which are not necessary for C++ clients. With the help of the common type system (CTS), value and reference types can be defined in any language and used from any other language. Additionally, the elimination of the DLL helped in problems faced in COM and the introduction of side-by-side deployment of components in the .NET framework resolved the deployment issue faced while using multiple components.

Managed code adhering to specifications of CLS is called CLS-compliant. This helps the objects coded in different languages to communicate with each other. However, .NET does not restrict the components to only use features defined in the CTS, which cannot be used from other different languages. By setting the value of the CLS-compliant attribute for an assembly, the assembly can be CLS-compliant and alert the compiler to issue warnings, if there are any non-CLS-compliant data types used in public and protected methods.

CTS also plays a vital role in runtime support for cross-language integration, by defining the set of rules for the language to follow and providing type safety, high performance code execution, etc., along with a rich set of types used in a variety of languages.

The .NET consumer and the .NET extender tool are two types of tools that help in working with components and provide cross-language support.

This definition was written in the context of .NET

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.