原文地址:http://fsharpforfunandprofit.com/why-use-fsharp/

Why use F#?
Why you should consider using F# for your next project

为什么要用F#?
为什么你应该考虑在下一个项目使用F#

Although F# is great for specialist areas such as scientific or data analysis, it is also an excellent choice for enterprise development. Here are five good reasons why you should consider using F# for your next project.
F#不仅仅在科学和数据分析这类专业领域很适用,对于企业开发来说它也是个很好的选择。以下是为什么你应该考虑在下一个项目使用F#的五个原因。

Conciseness
F# is not cluttered up with coding "noise" such as curly brackets, semicolons and so on.
You almost never have to specify the type of an object, thanks to a powerful type inference system.
And, compared with C#, it generally takes fewer lines of code to solve the same problem.
简洁
F#不会被大括号、分号等代码“杂音”弄得乱七八糟。
多亏强大的类型推导系统,你几乎不需要指定对象的具体类型。
并且,相对于C#,它通常只用更少的代码就能解决同样的问题。

Convenience
Many common programming tasks are much simpler in F#. This includes things like creating and using complex type definitions, doing list processing, comparison and equality, state machines, and much more.
And because functions are first class objects, it is very easy to create powerful and reusable code by creating functions that have other functions as parameters, or that combine existing functions to create new functionality.
方便
一些常见的编程任务在F#里非常简单。例如:创建和使用一个复杂的自定义类型,处理列表,比较,状态机等等。
并且,由于函数是"第一等公民",所以可以通过创建函数的方式,来轻松的编写强大可重用的代码,创建函数时,可以用其它函数作为参数,或者合并已有的函数来创造新的功能。

Correctness
F# has a powerful type system which prevents many common errors such as null reference exceptions.
Values are immutable by default, which prevents a large class of errors.
In addition, you can often encode business logic using the type system itself in such a way that it is actually impossible to write incorrect code or mix up units of measure, greatly reducing the need for unit tests.
正确
F#有一个强大的类型系统,可以预防例如空指针应用之类的常见错误。
值默认是不可变的,也可以预防一大类的错误。
此外,你还可以使用类型系统本身对业务逻辑进行编码,这样就不可能写出不正确的代码,或者混淆度量单位,大大降低了对单元测试的需求。

Concurrency
F# has a number of built-in libraries to help when more than one thing at a time is happening. Asynchronous programming is very easy, as is parallelism. F# also has a built-in actor model, and excellent support for event handling and functional reactive programming.
And of course, because data structures are immutable by default, sharing state and avoiding locks is much easier.
并发
F#有一些内置的库来帮助处理多件事同时发生的情况。因为并发,异步编程也很简单。F#还内置了一个actor模型,对事件处理和反射式编程也有很好的支持。
当然,因为默认情况下数据结构是不可变的,共享状态和避免锁也容易得多了。

Completeness
Although it is a functional language at heart, F# does support other styles which are not 100% pure, which makes it much easier to interact with the non-pure world of web sites, databases, other applications, and so on. In particular, F# is designed as a hybrid functional/OO language, so it can do virtually everything that C# can do.
Of course, F# is part of the .NET ecosystem, which gives you seamless access to all the third party .NET libraries and tools. It runs on most platforms, including Linux and smart phones (via Mono).
Finally, it is well integrated with Visual Studio, which means you get a great IDE with IntelliSense support, a debugger, and many plug-ins for unit tests, source control, and other development tasks. Or on Linux, you can use the MonoDevelop IDE instead.
完备
尽管F#的核心是函数式编程语言,但是它并不是百分百的纯函数式,F#支持其它的编程范式,这样可以让它更方便的与web网站、数据库、其它应用等进行交互。特别是F#被设计成一个混合性/面向对象的编程语言,所以它几乎可以做所有C#能做的事。
当然,作为.NET生态系统的一部分,F#可以无缝连接所有的第三方.NET库和工具。他可以运行在包括Linux和智能设备在内的大部分系统平台。
最后,它与VS高度集成,意味着你可以得到强悍的智能感知,调试器,以及各种单元测试、代码版本控制之类的插件等等。在Linux平台,你也可以使用MonoDevelop来作为IDE。

F#之旅1 - Why use F#?为什么要用F#?的更多相关文章

  1. F#之旅4 - 小实践之快排

    参考文章:https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/posts/fvsc-quicksort.html F#之旅4 - 小 ...

  2. F#之旅0 - 开端

    F#之旅0 - 开端 UWP的学习告一段落,CozyRSS的UWP版本并没有做.UWP跟wpf开发几乎一模一样,然后又引入了很多针对移动设备的东西,这部分有点像android.没啥太大的意思,不难,估 ...

  3. F# 之旅(上)

    写在前面的话 解答一下在上一篇文章<在Visual Studio中入门F#>中有人的提问, 1. 问:是准备写 F# 系列吗?    答:当然不是,本人也是刚刚学习 F#,只是翻译微软官方 ...

  4. F# 之旅(下)

    写在前面的话 学习 F# 一定要去体会函数式编程的特点,推荐一下阮一峰的日志<函数式编程入门教程>. 在这篇文章中 递归函数 记录和可区分联合类型 模式匹配 可选类型 度量单位 类和接口 ...

  5. F#之旅3 - F# PK C#:简单的求和

    原文链接:https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/posts/fvsc-sum-of-squares.html Comp ...

  6. F#之旅9 - 正则表达式

    今天,cozy群有个群友发了条正则,问正则匹配相关的问题.虽然他的问题用html selector去处理可能更好,但是我也再一次发现:我忘了正则怎么写的了! 忘掉正则是有原因的,这篇文章会简单记录下F ...

  7. F#之旅8 - 图片处理应用之动画二维码

    首先,先介绍下什么是动画二维码.前些天在网上闲逛,突然看到一个开源项目,发现一种二维码的新玩法.https://github.com/sylnsfar/qrcode/blob/master/READM ...

  8. F#之旅6 - 简单AV推荐系统

    上回说到用F#来写爬虫,这只是F#学习第一阶段的第一步.最开始,就对第一阶段做了这样的安排: 1.爬虫爬取AV数据 2.数据处理和挖掘 3.数据可视化(使用ECharts) 4.推荐系统 第一步很快就 ...

  9. F#之旅5 - 小实践之下载网页(爬虫基础库)

    参考文章:https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/posts/fvsc-download.html 参考的文章教了我们如 ...

随机推荐

  1. ubuntu竖屏显示

    xrandr -o left 向左旋转90度 xrandr -o right 向右旋转90度 xrandr -o inverted 上下翻转 xrandr -o normal 回到正常角

  2. js 刷新页面window.location.reload();

    Javascript刷新页面的几种方法:1    history.go(0)2    window.location.reload() window.location.reload(true) 3   ...

  3. 语言模型kenlm的训练及使用

    一.背景 近期研究了一下语言模型,同事推荐了一个比较好用的工具包kenlm,记录下使用过程. 二.使用kenlm训练 n-gram 1.工具介绍:http://kheafield.com/code/k ...

  4. 一些关于angularJS的自己学习和开发过程中遇到的问题及解决办法

    这篇文章也许会不定时更新,主要记录这段时间内自己遇到的angularjs学习开发的一些问题的解决办法.本文以摘抄为主,主要目的还是将自己遇到的困惑在各个地方查到的解决办法的汇总,给自己留个备忘吧. 1 ...

  5. 【About Queue】(待改)

    队列 队列满足FIFO规则,先进先出. C语言代码:(Segmentation fault你大爷(メ ゚皿゚)メ) #include<stdio.h> #include<stdlib ...

  6. HDU4738 tarjan割边|割边、割点模板

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=4738 坑点: 处理重边 图可能不连通,要输出0 若求出的结果是0,则要输出1,因为最少要派一个人 #inc ...

  7. HTTP的客户端识别与cookie机制

    本文是<HTTP权威指南>的读书笔记 Web服务器可能同时在与数千个客户端同时进行会话,服务器需要记录下它们在与谁交谈,而不是认为所有的请求都来自于匿名客户端.在HTTP中可以有以下几种方 ...

  8. php获取用户 地区 、ip地址

    header("Content-type: text/html; charset=utf-8"); function getCity($ip = '')//获取地区 { if($i ...

  9. 读书笔记-JavaScript面向对象编程(一)

    PDF下载链接: http://pan.baidu.com/s/1eSDSTVW 密码: 75jr 第1章 引言 1.1 回顾历史 1.2 变革之风 1.3 分析现状 1.4 展望未来 1.5 面向对 ...

  10. codeblocks16.01 中配置Opencv3 姿势

    VS太大安装时间长,考虑到效率问题,可以使用opencv+codeblocks opencv3没有codeblocks版本,需要自己编译,编译过程略. 已编译版本下载地址 http://pan.bai ...