Go vs. Scala 用于实时 web 应用程序

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

Go vs. Scala for realtime webapps

问题

我正在编写一个使用Websockets在Google地图上更新车辆位置并与司机实时交换消息的Web应用程序。我已经尝试了Node.js和Tornado,但最终我还是决定在这个项目中使用静态类型。

Scala和Go都是很好的选择,但我很难在这两者之间做出决定。我主要使用C/C++/C#/Python进行编程,对Java的经验很少。

那么这两者有什么区别呢?接下来应该学习哪个?我知道这是主观的,但我想听听一些实战经验。另外,生态系统方面如何?据我所知,Scala继承了Java的生态系统,那Go呢?

英文:

I'm writing a webapp that uses websockets for updating vehicle positions on a google map and for exchanging messages with drivers in realtime. I've been playing around with Node.js as well as Tornado, but I've come to the conclusion that I'd prefer static typing for this project after all.

Two excellent choices seem to be Scala and Go, but I'm having a hard time deciding between those two. I've been mostly been programming in C/C++/C#/Python and have very little Java experience.

So how do those two compare? What would you learn next? I know this is subjective, but I'm kind of looking for some battle stories here. Also, what about the ecosystem? From what I can tell, Scala inherits Java's ecosystem, but what about Go?

答案1

得分: 4

Go的缺点是不成熟,实际应用经验很少。

Scala的缺点是你必须熟悉Java生态系统才能很好地使用Scala。你可能不能完全用Scala编写所有内容。而且,有些人可能会觉得学习Scala的曲线较高。

两者都支持Websockets(例如,Scala通过Lift,Go在标准库中)。

我相信你会更喜欢Go,因为它与Python更相似。

英文:

The down side of Go - immature, with very little real world experience.

The down side of Scala - you must be familiar with the Java eco system in order to utilize scala well. You probably can't write everything in Scala. Also, some might find the learning curve for Scala higher.

Both supports websockets (Scala through Lift for instance, and Go in the standard library).

I believe that you'll be more comfortable with Go, since it's more similar to Python than Scala.

huangapple
  • 本文由 发表于 2011年6月23日 18:53:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/6452880.html
匿名

发表评论

匿名网友

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

确定