oflang / ox

A language bring gears and levers to coding
GNU General Public License v3.0
1 stars 0 forks source link

It is rather like Scala #5

Closed WMJi closed 8 years ago

WMJi commented 8 years ago

Scala, the "scalable" and "language".

WMJi commented 8 years ago

Scala is not so good in flow control, but it definitely worths a try. Just try to pick it up.

WMJi commented 8 years ago

Scala vs Go - Could people help compare/contrast these on relative merits/demerits? https://www.quora.com/Scala-vs-Go-Could-people-help-compare-contrast-these-on-relative-merits-demerits

Nick Snyder: I have written Go at Google (and in my own time) and Scala at LinkedIn. Both are modern languages with first class concurrency features.

The following answer is based on my experience writing software at scale.

Go is an opinionated, minimal language that compiles to machine code.

Scala is a sophisticated, academic, functional, object-oriented, sandbox language that has a lot of features and runs on the JVM.

For any project that needs to scale to a non-trivial number of developers, I would choose Go over Scala every time for one reason: simplicity.

Before I dive in to my answer, I want to make a few general observations: Generally, less code is easier to understand than more code; however, there is a point at which code is so dense that it becomes hard to read. Code is read much more often than it is written. Code frequently lives longer than we want it to. The person who tests or maintains a piece of code is frequently not the original author. At scale, the skill level of developers reading/writing/maintaining/testing code is going to be a normal distribution around the mean of "not expert."

Writing code is an act of communication, not just between the author and the compiler (or runtime), but also between the author and a future reader of unknown skill level.