Scala的并发范式与Go相比如何?

huangapple go评论87阅读模式
英文:

How does Scala's concurrency paradigm compare with Go?

问题

我读到了Go语言在并发相关开发方面相比传统的Java线程等方式更加简单和容易避免错误。

Scala的并发库与Go相比如何?它们是否有相似之处,或者Go在这方面仍然领先?

英文:

I read how Go has made concurrency related development very easy and less error prone when compared to traditional java threading etc.

How does Scala's concurrency libraries compare with Go? Do they have similarities or Go is still ahead in this regard?

答案1

得分: 2

Scala没有像Go那样内置的并发原语,但是有很多用于并发的库和包。即使在标准库中也有Actors,它们类似于CSP,这是Go遵循的并发模式。

还有akka

说到CSP,Go并不领先于任何东西。他们只是让使用更加可忍受和一致。以erlang为例,他们很长时间以来一直在使用CSP。

英文:

Scala does not have concurrency primitives built-in like go but there are plenty of libraries and packages for concurrency. Even with the standard library come Actors, which are similar to CSP, the concurrency pattern go follows.

Not to forget akka.

Speaking of CSP, go is not ahead of anything. They just made it more bearable and consistent to use. Take erlang for example. They use CSP for a very long time now.

huangapple
  • 本文由 发表于 2012年10月13日 02:55:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/12865375.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定