F# (sharp) 将如何使用? [英] How will F# (sharp) be used?

查看:16
本文介绍了F# (sharp) 将如何使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在介绍 Microsoft 将要引入的 F# 语言的概念和可能性时遇到问题.

I'm having trouble placing the concepts and possiblities of the to be introduced F# language from Microsoft.

F# 是否仅用于声明函数?还是通过将 F# 与普通 C# 或 VB 代码混合在一起,将应用程序完全"用 F# 编写?

推荐答案

我的期望是 F# 将用于部分一些专门系统 - 涉及复杂线程/数学/金融/的位建模/等,其中 F# 做得很好.对于大多数其他领域(UI、DAL 等),像 C# 这样的通用语言似乎 (IMO) 更可取.

My expectation is that F# will be used for pieces of some specialized systems - the bits that involve complex threading / maths / financial / modelling / etc, where F# does well. For most other areas (UI, DAL, etc), a general purpose language like C# seems (IMO) preferable.

F# 的一个优点是(理论上)您可以证明代码正在工作,而不仅仅是测试它.线程支持(由于不变性和 async ! 用法)也很好(尽管 PLINQ 可能会在线程上竞争).

One of the advantages of the F# is that (in theory) you can prove code is working, rather than just test it. The threading support (thanks to immutability and the async ! usage) is also good (although PLINQ may compete on threading).

连接到 .NET 以允许在 F#、C#、VB、IronPython、IronRuby 等之间进行适当的集成 - 真正展示了每个的优势.今天如果我做很多 COM 互操作,我会考虑 VB(这将在 4.0 中通过 dynamic 改变);对于大多数代码 - C#.对于数学等,F#.整洁.

Hooking into .NET to allow proper integration between F#, C#, VB, IronPython, IronRuby, etc - really shows the strengths of each. Today if I was doing lots of COM interop, I'd consider VB (that'll change in 4.0 with dynamic); for most code - C#. For math etc, F#. Tidy.

这篇关于F# (sharp) 将如何使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆