ABSTRACT

This chapter looks at some of the important aspects of functional programming and F#. It also looks at building a basic understanding of new additions in.NET Framework 4, such as Dynamic Language Runtime (DLR) and.NET-supported dynamic languages. DLR provides a common framework, a certain set of services, and a runtime execution environment for dynamic languages to function. It provides a pluggable engine to onboard dynamic language compilers through respective binders. DLR is built on top of CLR. The dynamic languages can easily interoperate with CLR languages such as C# or VB.NET, and applications can benefit from their respective unique characteristics. Expression trees are a way of representing code in a tree structure. All languages that work with the DLR represent code in the same structure, allowing interoperability. Call Site Caching is built on top of expression trees. Being interpreted, resolving objects at runtime each time is an expensive operation; hence, the DLR caches dynamic operations.