微软把函数编程(F#)引入到主流.NET企业平台中

发布于 2022-08-17 01:47:14 字数 2997 浏览 33 评论 1

微软把函数编程(F#)引入到主流.NET企业平台中
微软早已喧布把F#(FPL)整合进Visual Studio中,这标志FPL在.Net平台中的实现是可行的,这提升 了FPL在企业环境中应用的可能性,这说明了.Net平台(CLR)的支持能力的广泛性,F#的灵感来自于OCaml
(PL),F#的一部分与OCaml很大程度上是兼容的,F#提供给开发者很多有价值的和强制性的特征,以不失运行时间效率为前提,F#也支持交互的执行方式,有动态语言的特征,F#共享.Net下的API与组件。
一、函数编程的优点:
   与命令式语言比较可以得出一些结论,命令式语言通过改变程序状态获得计算执行的结果,FPL按照  mathematical evaluation and reduction这个原则执行,这些语言以形式数学逻辑与计算理论为构筑基础,FPL很大程度上基于lambda calculus(Alonzo Church),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.
二、.Net中的FP
   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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百变从容 2022-08-17 04:13:53

sun还有个Fortress(竞争点)
http://projectfortress.sun.com/Projects/Community
Visual Haskell
http://www.haskell.org/visualhaskell/

[ 本帖最后由 fuqiang_huang 于 2008-9-14 14:16 编辑 ]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文