你为什么决定“反对”使用Erlang? [英] Why did you decide "against" using Erlang?

查看:149
本文介绍了你为什么决定“反对”使用Erlang?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你实际上是试过(意思是编程,不只是读一篇文章)Erlang,并决定反对一个项目?如果是这样,为什么?另外,如果你选择回到你的旧语言,或使用另一种功能性语言,如F#,Haskell,Clojure,Scala,或者其他的东西,那么这也算一下,并说明原因。

解决方案

为了Haskell的惊人类型系统的简单美德,我从Erlang回到了Haskell的个人项目。 Erlang为您提供了大量工具来解决问题。 Haskell为您提供工具,以防止您出现错误。



当使用强类型系统的语言工作时,您可以有效地为每个代码证明自由定理时间你编译。



你还会从Haskell的类型机器中获得一堆重载糖,但这在很大程度上是次要的 - 即使它允许我表达一个在Erlang(例如Haskell的类别 - 附加)中抽象的数量将非常冗长或非惯用和不可用。



我喜欢Erlang,我喜欢它的频道和它的轻松可扩展性。当我需要的时候,我转向它。哈斯克尔不是灵丹妙药我放弃对空间消费的更好的操作理解。我放弃魔法一次垃圾收集器。我放弃OTP模式和所有这些轻松的可扩展性。



但是,我很难放弃安全毯,就像Haskell所说的那样,如果它是typechecks,这可能是正确的。


Have you actually "tried" (means programmed in, not just read an article on it) Erlang and decided against it for a project? If so, why? Also, if you have opted to go back to your old language, or to use another functional language like F#, Haskell, Clojure, Scala, or something else then this counts too, and state why.

解决方案

I returned to Haskell for my personal projects from Erlang for the simple virtue of Haskell's amazing type system. Erlang gives you a ton of tools to handle when things go wrong. Haskell gives you tools to keep you from going wrong in the first place.

When working in a language with a strong type system you are effectively proving free theorems about your code every time you compile.

You also get a bunch of overloading sugar from Haskell's typeclass machinery, but that is largely secondary to me -- even if it does allow me to express a number of abstractions that would be terribly verbose or non-idiomatic and unusable in Erlang (e.g. Haskell's category-extras).

I love Erlang, I love its channels and its effortless scalability. I turn to it when these are the things I need. Haskell isn't a panacea. I give up a better operational understanding of space consumption. I give up the magical one pass garbage collector. I give up OTP patterns and all that effortless scalability.

But its hard for me to give up the security blanket that, as is commonly said, in Haskell, if it typechecks, it is probably correct.

这篇关于你为什么决定“反对”使用Erlang?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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