Getting started with Scala and RChain Scala style guide

Why are we using Scala for RChain? 

Scala is a type-safe, mostly-functional language whose semantics are relatively well understood. That means that when we write software in Scala, we have some kind of prayer that we can prove it works the way we intended. We could have chosen another functional language, like Haskell, but we liked Scala because it runs on the JVM. That means that production integration is an easier sell to IT managers and business-people. They almost certainly have the JVM running in their stack, somewhere, and so we're not asking to place something esoteric in their data centers. The early core development team--Greg Meredith, Mike Stay, and others--had a lot of experience with Scala and were happy with it. As a result, we all agreed that Scala would be an excellent tool for realizing the RChain technology vision.

As far as "why didn't you choose X?," the answer is that we chose Scala. We didn't "not choose" whatever other language. Erlang, Golang, Rust, and Haskell are all fine languages, but they're not the language RChain will be written in. Projects do not succeed because of the programming language they're written in. Projects succeed or fail because of the people and because of the ideas. We have found that the Scala community contains many very talented people and that hiring Scala developers has allowed us to be more successful in the hiring process than one would statistically expect. Scala also allows us to express our ideas with clarity in a functional setting, while leveraging a variety of existing toolsets to great effect. This is a very powerful combination.   ~Nash Foster

New to Scala?

Use the resources below to get started.

  1. Setting up your environment using either IDE or command line
  2. Tour of Scala - This tour contains bite-sized introductions to the most frequently used features of Scala. It is intended for newcomers to the language.
  3. Scala tutorial for Java programmers

Books and resources recommended by the RChain development team

RChain Scala style guide

To assure code quality the RChain development team has adopted some common practices related to the implementation of Scala on the project. Below are resources to related to these decisions. As you are working and run into questions about how to use Scala on the project, please ask!!

*Note - resources below pulled from conversations in the RChain development team discord channel.