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

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. 

主站蜘蛛池模板: 鄄城县| 宝坻区| 阳曲县| 雷州市| 泸溪县| 衡阳市| 金堂县| 油尖旺区| 花莲市| 富宁县| 仙桃市| 三河市| 华阴市| 青州市| 刚察县| 慈利县| 平谷区| 吉首市| 新和县| 星子县| 城口县| 卓资县| 仁化县| 晋宁县| 宣城市| 天全县| 开鲁县| 九台市| 阳西县| 石首市| 革吉县| 屏东市| 正镶白旗| 乐平市| 东莞市| 林州市| 新密市| 来凤县| 广昌县| 全南县| 盖州市|