我如何在现实世界中使用函数式编程? [英] How can I use functional programming in the real world?

查看:115
本文介绍了我如何在现实世界中使用函数式编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

函数式语言很好,因为它们通过消除状态来避免错误,还因为它们可以自动为您自动并行化,而无需担心线程数量。

作为一名Win32开发者,我可以使用Haskell来处理我的应用程序的某些DLL吗?如果我这样做,是否有一个真正的优势,我会自动采取?如果是这样,编译器是什么给了我这个优点?

F#能够并行处理您为多核心和cpu自动编写的函数吗?你会发现任务管理器中的线程数增加吗?基本上我的问题是,我怎样才能以实用的方式开始使用Haskell,我真的会看到一些好处吗?如果我这样做?

解决方案

看起来真正的世界Haskell这本书就是你要找的东西。您可以在线免费阅读:

http:// book。 realworldhaskell.org/


Functional languages are good because they avoid bugs by eliminating state, but also because they can be easily parallelized automatically for you, without you having to worry about the thread count.

As a Win32 developer though, can I use Haskell for some dlls of my application? And if I do, is there a real advantage that would be taken automatically for me? If so what gives me this advantage, the compiler?

Does F# parallelize functions you write across multiple cores and cpu's automatically for you? Would you ever see the thread count in task manager increase?

Basically my question is, how can I start using Haskell in a practical way, and will I really see some benefits if I do?

解决方案

It seems like the book Real World Haskell is just what you're looking for. You can read it free online:

http://book.realworldhaskell.org/

这篇关于我如何在现实世界中使用函数式编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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