|
|
AS OF 5/21/2008 7:02PM EST
|
F is for Functional
Microsoft Researchs F# programming language will be productized
By David Worthington
November 1, 2007 —
Anyone who thinks that functional programming languages are extinct everywhere but in the insular world of academia is in for a surprise. Microsoft is transferring an experimental programming language called F# (pronounced: F-sharp) from its research labs into its products. Now, Microsoft is ready to use what was nearly dismissed as yesterdays technology to tackle the programming challenges of today.
F# is a hybrid functional and object-oriented programming language that was created by researchers at Microsoft's Cambridge, U.K., lab to demonstrate interoperability between different programming paradigms. It has roots in the ML family of functional programming languages and is compatible with OCaml. The researchers also drew concepts from C# and Haskell, another functional programming language.
A prototype F# plug-in for Visual Studio 2003 and 2005 provides a graphical development workspace for developers. The plug-in assists with type inference, a feature present in strongly statically typed programming languages such as OCaml.
Functional programming languages such as APL, Erlang and Lisp treat computation as the evaluation of mathematical functions. Object-oriented languages largely displaced them, as the industry opted for another layer of abstraction, retiring the let statement.
"I am a big fan of technology transfer between a research organization and a product development organization so that we can 'productize' the great research ideas and deliver to customers in a timely manner," wrote Microsoft developer division corporate vice president S. Somasegar in an Oct. 24 blog posting. Somasegar pronounced F# as one of the best things that has happened at Microsoft since establishing its research division 15 years ago.
Many computer science departments around the world teach functional programming languages today, he claimed. We believe that through F# and languages such as IronPython and IronRuby, we can help offer students and educators choices beyond the current mainstream and enable the use of these languages across the curriculum. This helps educators have the option to use Visual Studio as a consistent tool set from course to course, Somasegar wrote.
Somasegar added that ideas from functional programming languages are helping Microsoft address some of the biggest challenges facing the industry today, including the impedance mismatch between data and objects and the challenges of programming in a world of multicore and parallel hardware.
Libraries That Straighten OCaml's Back But dont plan on F# being productized anytime soon. Jay Roxe, group product manager in Microsoft's developer division said, "Microsoft has not yet laid out a schedule for the formal release of F#. The plan is to get community feedback during the development phase with CTPs and beta releases that developers can try out along the way."
Microsoft worked on F# in collaboration with members of the OCaml community, including Xavier Leroy, a primary developer of the Objective Caml system and senior scientist at the French National Institute for Computer Science and Control, INRIA. The end result is that Caml code can now be ported to .NET, and F# code can be run with OCaml.
What makes F# unique and different from Caml is that it combines the attributes of a functional programming language with the object model of .NET. It has immediate access to the .NET Frameworks APIs, shares its tools and integrates directly with Windows. F# can create .NET components by producing ILX, .NET's intermediary language, or compile into .NET binaries. C# and F# can call each other directly due to this aspect of its design
The best F# code development experience is currently with Visual Studio 2005 and .NET 2.0, or VS 2008 Beta 2 and .NET 3.5, said a Microsoft spokesperson.
Additionally, F# supports dynamic linking, preemptive multithreading and SMP machine support, and Unicode stringsfeatures that are unavailable in other ML language implementations, according to Microsoft Research's project Web site. It also provides interactive scripting that is akin to Python.


|