(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=38214644
是的,不幸的是,这似乎是大多数人对 Elixir/Erlang/OTP 的主要看法——“看起来有点像 Ruby!” 虽然语法糖无疑很有吸引力,但它并没有改变底层架构,从而使其与传统命令式语言相比具有如此独特的性能。 如果有人想要一种动态的、可扩展的语言来构建分布式、高度并发、近实时的系统——Elixir/Erlang/OTP 肯定比其他语言更胜一筹。 然而,如果需求不是那么专业,那么可能不值得增加学习曲线。 关于前面在另一篇文章中提到的部署挑战,这确实可能是跨异构环境进行大规模部署的真正障碍 - 但这绝对不仅限于 Elixir 或 Erlang。 容器化架构面临着许多挑战,尤其是与网络相关的挑战——无论基本语言是什么。 OP 对静态类型的建议的另一个关键方面是,虽然大多数工具和框架提供了一些不错的静态分析功能,但很大一部分需要自定义类型规范 - 与提供全自动静态类型的 TypeScript、Rust 或 Scala 不同 通过语言本身进行推理; 这是一个额外的间接层,增加了额外的开销。 最后,对于刚接触该平台或框架的开发人员来说,在 OTP 和 Elixir/Erlang 的流程设计范例以及掌握各种 erlang 结构的来龙去脉(尤其是与状态管理相关的方面)方面经历令人不快的学习曲线并不罕见。 在流程上下文中。 由于 Elixir 本质上是一个全新的学习堆栈,尤其是相对于现有的能力而言,陡峭的学习曲线肯定会让一些人望而却步。
I really want to try out this language. I love the idea of Erlang but the few times I've had to deal with it (an ejabberd chat server was one) I found it to be a bit too quirky. Every video I've seen with Joe Armstrong leads me to believe he was an under-appreciated genius. Isolated processes and message passing (Actors) seem a good candidate for the future of distributed programming (see this recent video from Crockford on his new Misty programming language [1] - notice how the questions were about Elixir/Erlang). I love pattern matching and elixir uses this to a high degree.
However, I am not 100% sold. Clearly this community punches above its weight, and the BEAM is obviously no slouch and is a brilliant choice for a platform to build upon. But I get concerned looking at the magic of LiveView (and LiveBook). My experience is that if something sounds too good to be true, it often is. A lot of the jargon is also totally unfamiliar to me - things like GenServers and other esoteric kinds of platform specific knowledge. It feels like stepping into a one-way portal, I'm not sure any knowledge in that universe is transferable.
There is a huge risk in niche languages and platforms. Hard to hire for, hard to find libraries for, hard to find blogs/tutorials/etc. With alternatives like Go having a pretty respectable concurrency story ... it is pretty hard to justify taking the risk on such a small community.
But kudos to that community. It is honestly impressive to me what they have achieved. I'm also very excited to see what happens with their type system implementation.
1. https://www.youtube.com/watch?v=R2idkNdKqpQ
reply