官术网_书友最值得收藏!

Writing Your First Program

In 2001, Martin Odersky started to design the Scala language – it took him three years to release the first public version. The name comes from Scalable language. This was chosen because Scala is designed to grow with the requirements of its users – you can use Scala for small scripts or for large enterprise applications.

Scala has been constantly evolving ever since, with a growing popularity. As a general purpose language, it is used in many different industries such as finance, telecoms, retail, and media. It is particularly compelling in distributed scalable systems and big data processing. Many leading open source software projects have been developed in Scala, such as Apache Spark, Apache Kafka, Finagle (by Twitter), and Akka. A large number of companies use Scala in production, such as Morgan Stanley, Barclays, Twitter, LinkedIn, The Guardian, and Sony.

Scala is not an extension of Java but is fully interoperable with it. You can call Java code from Scala, and you can call Scala code from Java. There is also a compiler to JavaScript, which we will explore later on in this book. You can, therefore, run Scala code in your browser.

Scala is a blend of object-oriented and functional programming paradigms, and it is statically typed. As such, it can serve as a bridge for people from an object-oriented or imperative background to move gradually to functional programming.

In this chapter, we will cover the following topics:

  • Setting up your environment
  • Using the basic features
  • Running the Scala Console
  • Using the Scala Console and Worksheet
  • Creating my first project
主站蜘蛛池模板: 轮台县| 泸溪县| 合江县| 乐昌市| 和政县| 大荔县| 柞水县| 苗栗县| 北京市| 舟曲县| 桐柏县| 上思县| 广德县| 静乐县| 安塞县| 伊川县| 文化| 昭觉县| 绥棱县| 宾阳县| 海门市| 志丹县| 白山市| 上虞市| 会东县| 梧州市| 南郑县| 大港区| 滁州市| 澄迈县| 佳木斯市| 板桥市| 通江县| 明水县| 铁岭县| 涟源市| 姚安县| 鹤岗市| 兴和县| 禹城市| 乐亭县|