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

Overview of Scala

Scala is a scalable, functional, and object-oriented programming language that is most closely related to Java. However, Scala is designed to be more concise and have features of functional programming languages. For example, Apache Spark, which is written in Scala, is a fast and general engine for large-scale data processing.

Scala's success is due to many factors: it has many tools that enable succinct expression, it is very concise because you need less typing, and it therefore requires less reading, and it offers very good performance as well. This is why Spark has more support for Scala in the sense that more APIs are available that are written in Scala compared to R, Python, and Java. Scala's symbolic operators are easy to read and, compared to Java, most of the Scala codes are comparatively concise and easy to read; Java is too verbose. Functional programming concepts such as pattern matching and higher-order functions are also available in Scala.

The best way to get started with Scala is either using Scala through the Scala build tool (SBT) or to use Scala through an integrated development environment (IDE). Either way, the first important step is downloading, installing, and configuring Scala. However, since Scala runs on Java Virtual Machine (JVM), having Java installed and configured on your machine is a prerequisite. Therefore, I'm not going to cover how to do that. Instead, I will provide some useful links (https://en.wikipedia.org/wiki/Integrated_development_environment).

Just follow the instructions on how to set up both Java and an IDE (for example, IntelliJ IDEA) or build tool (for example, SBT) at  https://www.scala-lang.org/download/. If you're using Windows (for example, Windows 10) or Linux (for example, Ubuntu), visit  https://www.journaldev.com/7456/download-install-scala-linux-unix-windows. Finally, here are some macOS instructions:  http://sourabhbajaj.com/mac-setup/Scala/README.html.

Java programmers normally prefer Scala when they need to add some functional programming flavor to their codes as Scala runs on JVM. There are various other options when it comes to editors. The following are some options to choose from:

  • Scala IDE
  • Scala plugin for Eclipse
  • IntelliJ IDEA
  • Emacs
  • Vim

Eclipse has several advantages using numerous beta plugins and local, remote, and high-level debugging facilities with semantic highlighting and code completion for Scala. 

主站蜘蛛池模板: 交口县| 元氏县| 炉霍县| 宝鸡市| 会理县| 甘南县| 高平市| 内江市| 乐都县| 栾川县| 读书| 莱芜市| 乌兰察布市| 高要市| 萨嘎县| 肥城市| 砚山县| 丁青县| 沐川县| 鲁甸县| 山阴县| 周至县| 贵州省| 岳阳市| 兴隆县| 盐津县| 安丘市| 阿尔山市| 富锦市| 简阳市| 连云港市| 安康市| 芦溪县| 集安市| 平原县| 中方县| 布尔津县| 高平市| 阿鲁科尔沁旗| 封丘县| 凯里市|