Haskell在现实世界中的用途是什么? [英] What is Haskell used for in the real world?

查看:151
本文介绍了Haskell在现实世界中的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Haskell周围有很多炒作,但是,很难获得有关在实际应用中如何使用它的信息. Haskell最受欢迎的项目/用法是什么?为什么它擅长解决这些问题?

There is a lot of hype around Haskell, however, it is hard to get information on how it is used in the real world applications. What are the most popular projects / usages of Haskell and why it excels at solving these problems?

推荐答案

此功能有哪些常见用途 语言?

What are some common uses for this language?

快速的应用程序开发.

如果您想知道为什么要使用Haskell?",那么您需要考虑函数式编程语言的优势(取自

If you want to know "why Haskell?", then you need to consider advantages of functional programming languages (taken from https://c2.com/cgi/wiki?AdvantagesOfFunctionalProgramming):

  • 功能程序往往比其ImperativeLanguage程序简洁得多.通常这会导致增强 程序员的生产力

  • Functional programs tend to be much more terse than their ImperativeLanguage counterparts. Often this leads to enhanced programmer productivity

FP鼓励快速制作原型.因此,我认为这是ExtremeProgrammers的最佳软件设计范例...但是我知道什么?

FP encourages quick prototyping. As such, I think it is the best software design paradigm for ExtremeProgrammers... but what do I know?

FP在功能方面是模块化的,而ObjectOrientedProgramming在功能方面是模块化的 组件.

FP is modular in the dimension of functionality, where ObjectOrientedProgramming is modular in the dimension of different components.

吃蛋糕和吃蛋糕的能力.想象一下,您有一个复杂的面向对象的系统来处理消息-每个组件都可能产生状态 根据消息进行更改,然后将消息转发给某些消息 它具有链接的对象.能不能太酷了 如果某个对象深入到调用中,则轻松回滚所有更改 等级确定消息是否有缺陷?有一个历史 不同的状态?

The ability to have your cake and eat it. Imagine you have a complex OO system processing messages - every component might make state changes depending on the message and then forward the message to some objects it has links to. Wouldn't it be just too cool to be able to easily roll back every change if some object deep in the call hierarchy decided the message is flawed? How about having a history of different states?

为您执行的许多内部管理任务:解构数据结构(PatternMatching),存储变量绑定(LexicalScope与 闭包),强类型(TypeInference),GarbageCollection,存储 分配,使用盒装(指针到值)还是未盒装(值 直接)表示形式...

Many housekeeping tasks made for you: deconstructing data structures (PatternMatching), storing variable bindings (LexicalScope with closures), strong typing (TypeInference), GarbageCollection, storage allocation, whether to use boxed (pointer-to-value) or unboxed (value directly) representation...

安全的多线程!不变的数据结构不受数据争用条件的影响,因此不必受到以下方面的保护: 锁.如果您总是分配新对象,而不是 破坏性地操纵现有的锁,可以将其隐藏在 分配和GarbageCollection系统.

Safe multithreading! Immutable data structures are not subject to data race conditions, and consequently don't have to be protected by locks. If you are always allocating new objects, rather than destructively manipulating existing ones, the locking can be hidden in the allocation and GarbageCollection system.

除此Haskell之外,它还有其他优点,例如:

Apart from this Haskell has its own advantages such as:

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