Tuesday, September 28, 2010

Dynamic Lanugage Runtime

The dynamic language runtime (DLR) is a runtime environment which sits on top of the common language runtime (CLR) and provides a set of services for dynamic languages to run on .Net framework. It includes a set of Libraries and constructs to allow the objects to be identified at run time compared to the statically typed languages like c# where the object types have to be defined at compile time. 
Scripting/Interpreted languages like JavaScript, PHP can be good examples for Dynamic Languages.

Other Popular examples are Lisp, Smalltalk, Ruby, ColdFusion

Primary Advantages of DLR
  • Simplifies Porting Dynamic Languages to the .NET Framework
  • Enables Dynamic Features in Statically Typed Languages
  • Enables Sharing of Libraries and Objects
  • Provides Fast Dynamic Dispatch and Invocation

Architecture
The main services DLR offers to CLR include the following:
  • Expression trees: Used to represent Language semantics
  • Call site caching: It caches information about operations and types if already executed, so as to achieve faster processing.
  • Dynamic object interoperability: Provides a set of classes for the language implementers to use & extend their interoperability with .net

No comments:

Post a Comment