英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论