Microsoft to push functional programming into the mainstream with F#Microsoft has announced that support for the F# functional programming language will be fully integrated into Visual Studio. This marks a bold new commitment to facilitating functional programming on the .NET platform and could potentially help legitimize functional programming in enterprise environments. Microsoft's promotion of F# to a fully-supported language in Visual Studio is also indicative of the extreme versatility of the .NET platform and Microsoft's Common Language Runtime.
F# began its life as a Microsoft Research project to demonstrate the efficacy of .NET as a platform for mixing multiple distinct programming paradigms. F# is heavily inspired by the OCaml programming language, and a subset of F# and OCaml are largely compatible. F# offers developers many valuable and compelling features without sacrificing much runtime efficiency. F# supports type inference, pattern matching, high-order functions, and currying. F# also supports interactive execution, which means that F# programs can be run like scripts or inputted in an interactive top-level environment similar to the Python shell or Ruby's IRB. F# also has full access to the .NET APIs and components written in other .NET languages.
The advantages of functional programming
Unlike imperative or procedural programming languages, in which computation is typically performed by altering program state, functional programming languages operate on the principles of mathematical evaluation and reduction. Such programming languages are deeply rooted in formal mathematical logic and computational theory. Functional programming languages are largely based on the system of lambda calculus devised by Alonzo Church, in which numerical values, sequences, data structures, basic mathematical computations, and even recursion can be expressed entirely with nested functions.
The close association with lambda calculus and category theory makes functional languages a powerful tool for understanding and programmatically modeling concepts like catamorphisms and recursion. For some programmers, learning to see the ineffable theoretical perfection of functional programming languages is a profoundly illuminating experience that opens the mind to a completely new way of perceiving and understanding computer programming. In some cases, certain functional programming languages are also valued because functional purity is highly conducive to referential transparency and minimizes the potential for side effects.
Outside of the academic world, functional programming idioms are valued because they are often far more expressive than imperative or procedural equivalents. Modern dynamic scripting languages like Python and Ruby, for instance, offer first-class functions in order to boost developer productivity. Even C# offers some features—like LINQ—that are heavily based on functional programming concepts. The ability to mix F# and C# in .NET applications makes it far easier for software developers to use the programming paradigms that are best suited for each individual task.
Functional programming on .NET
Microsoft's decision to productize F# represents a particularly significant step forward for the .NET platform. Microsoft took an equally significant step when it unveiled the Dynamic Language Runtime earlier this year. The .NET platform now fully, officially, and equally supports functional, dynamic, and conventional imperative programming paradigms in an interoperable manner all with a single runtime. This is a tremendous accomplishment and strong evidence of the .NET platform's success and long-term viability.
Full Story At Source
Send via e-mail | Submit to Digg | Add to Live Favorites
http://feeds.feedburner.com/~r/binkdotnu/~3/174109378/microsoft-to-push-functional-programming-into-the-mainstream-with-f.aspx