MSDN Magazine Launch Issue - February 15, 2008 - (Page 81) Te d Neward F# Use Functional Programming Techniques In The .NET Framework recent entry into the Microsoft® .NET Framework family, F# provides type safety, performance, and the ability to work like a scripting language, all as part of the .NET environment. This functional language was created by Don Syme of Microsoft Research as a syntax-compatible OCaml variant for the CLR, but F# has been moving quickly from the lab into the workshop. As concepts of functional programming creep into more mainstream languages like C# and Visual Basic® through technologies like .NET generics and LINQ, the visibility of F# has grown within the .NET community—so much so that in November 2007 Microsoft announced that it would move F# into the stable of supported .NET programming languages. For years the area of functional languages (ML, Haskell, and so on) has been considered more appropriate for academic research than for professional development. It isn’t that these languages aren’t interesting. In fact, some important enhancements to .NET— generics, LINQ, PLINQ, and Futures, for example—come from the application of functional programming concepts to languages that had never seen them before. The lack of interest in these languages has been based more on the fact that they targeted platforms of little relevance to developers writing programs for Windows®, they didn’t integrate well with the underlying platform, or they didn’t support key functionality such as relational database access, XML parsing, and out-of-process communication mechanisms. However, the CLR and its “many languages, one platform” approach made it inevitable that more of these languages would make their way into the world of Windows development. It was equally inevitable that they would start to make their presence felt to practicing programmers. F# is one such language. In this article, I will introduce you to some of the concepts behind and advantages of F#. Then, to help you get started with F#, I will walk you through installation and writing several simple programs. Primer This article is based on a prerelease version of the F# compiler and tools. All information herein is subject to change. This article uses the following technologies: .NET Framework, F# This article discusses: Installing F# F# language basics ✥ .NET interoperability ✥ Asynchronous F# ✥ ✥ Ted Neward is an independent consultant specializing in high-scale enterprise systems. He is the author and coauthor of several books, a Microsoft MVP Architect, a BEA Technical Director, an INETA speaker, and a PluralSight instructor. Reach Ted at ted@tedneward.com or visit his blog at blogs.tedneward.com. launch2008 81 http://blogs.tedneward.com
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.