Microsoft to push functional programming into the mainstream with F#
2007-10-24 17:35
363 查看
原文:http://www.msblog.org/index.php/2007/10/24/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 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.
“[W]e aim to continue the flow of good ideas from functional programming world into mainstream development,” wrote Microsoft developer division vice president S. Somasegar in a blog entry. “Furthermore, the somewhat mathematical slant of functional programming just seems naturally appealing to professionals whose primary domain is described with mathematical notation—domains such as financial, scientific and technical computing. On top of the syntactic appeal, the strong type system yields the sort of guarantees which are often crucial in these domains, and enables a superb tooling experience through Visual Studio.”
Although this is the first time that Microsoft has treated functional programming on .NET as a product instead of an experiment, many independent developers have long used functional programming languages on top of .NET. The open-source Nemerle programming language, for instance, supports extremely impressive features like macros and is preferred over F# by some programmers in the Ars community. There are also several Standard ML and Lisp implementations for .NET.
As the C# programming language and .NET continue to evolve, developers can undoubtedly look forward to seeing more dynamic and functional programming concepts move out of scripting and academia to augment and complement more conventional programming techniques. Microsoft’s efforts to push dynamic and functional programming into the mainstream are one of many signs that the art of software development is enjoying a profound renaissance.
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.“[W]e aim to continue the flow of good ideas from functional programming world into mainstream development,” wrote Microsoft developer division vice president S. Somasegar in a blog entry. “Furthermore, the somewhat mathematical slant of functional programming just seems naturally appealing to professionals whose primary domain is described with mathematical notation—domains such as financial, scientific and technical computing. On top of the syntactic appeal, the strong type system yields the sort of guarantees which are often crucial in these domains, and enables a superb tooling experience through Visual Studio.”
Although this is the first time that Microsoft has treated functional programming on .NET as a product instead of an experiment, many independent developers have long used functional programming languages on top of .NET. The open-source Nemerle programming language, for instance, supports extremely impressive features like macros and is preferred over F# by some programmers in the Ars community. There are also several Standard ML and Lisp implementations for .NET.
As the C# programming language and .NET continue to evolve, developers can undoubtedly look forward to seeing more dynamic and functional programming concepts move out of scripting and academia to augment and complement more conventional programming techniques. Microsoft’s efforts to push dynamic and functional programming into the mainstream are one of many signs that the art of software development is enjoying a profound renaissance.
相关文章推荐
- [Redux] Using withRouter() to Inject the Params into Connected Components
- how to use a SQLite database in a standalone program with an HTML interface and VBScript as the programming language
- .NET P2P: Writing Peer-to-Peer Networked Apps with the Microsoft .NET Framework
- 【转】LAMBDAFICATOR: Crossing the gap from imperative to functional programming through refactorings
- 关于spring.net的面向切面编程 (Aspect Oriented Programming with Spring.NET)-使用工厂创建代理(Using the ProxyFactoryObject to create AOP proxies)
- Programming with the Microsoft Office Visio 2003 ActiveX Control
- .NET P2P: Writing Peer-to-Peer Networked Apps with the Microsoft .NET Framework
- Unable to communicate with the reporting component after logging into the Sym
- 44.Your database is functional with a peak load for the last one hour. You want to preserve the perf
- How to automate PowerPoint by using Visual C++ 5.0 or Visual C++ 6.0 with The Microsoft Foundation Classes
- Programming with the Microsoft Office Visio 2003 ActiveX Control
- Steps to developing Metro style apps 第一章-Creat a UI(3)Animating your UI with the Animation Library
- Android studio 1.0.1中Run with --stacktrace option to get the stack trace. Run with --info or --debug
- Are you looking for a way to get the entire text of a word document into a RichEdit without using the Clipboard?
- 解决docker push镜像时denied: requested access to the resource is denied : docker
- csharp: Export DataSet into Excel and import all the Excel sheets to DataSet
- Android--You need to use a Theme.AppCompat theme (or descendant) with this activity解决方案
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法