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

Chapter 1. Introducing Scientific Computing with Scala

Scala was first publicly released in 2004 by Martin Odersky, then working at école Polytechnique Fédérale de Lausanne in Switzerland. Odersky took part in designing the current generation of the Java compiler javac as well. Scala programs, when compiled, run on the Java Virtual Machine (JVM). Scala is the most popular of all the JVM languages (except for Java.) Like Java, Scala is statically typed. From the perspective of a programmer, this means that variable types will have to be declared (unless they can be inferred by the compiler) and they cannot change during the execution of the program. This is in contrast to dynamic languages, such as Python, where you don't have to specify a variable's type and can assign anything to any variable at runtime. Unlike Java, Scala has strong support for functional programming. Scala draws inspiration from languages such as Haskell, Erlang, and others in this regard.

In this chapter, we will talk about why you would want to use Scala as your primary scientific computing environment. We will consider the advantages it has over other popular programming languages that are used in the scientific computing context. We will then go over Scala packages meant specifically for scientific computing. These will be considered briefly and will be divided into categories depending on what they are used for. Some of these we will consider in detail in later chapters.

Finally, we provide a small introduction on best practices for how to structure, build, test, and distribute your Scala software. This is important even to people who know how to program in Scala already. This chapter introduces concepts that I consider essential, to write scientific software successfully. They are, however, often overlooked by scientists. The reason is that scientists often don't concern themselves with software development techniques; instead, they prefer to get the job done quickly. For example, it is not uncommon to neglect build systems, which are very important no matter what language you are using and are essential when writing software in statically typed, compiled languages. Testing is another area of software development criminally overlooked by the scientists I have had the pleasure to work with. The same is usually true of IDE's, debuggers, and profilers. All of these following topics will be discussed:

  • Why Scala for scientific computing?
  • Numerical computing packages for Scala
  • Data analysis packages for Scala
  • Other scientific software
  • Alternatives for carrying out plotting
  • Using Emacs as the Scala IDE
  • Profiling Scala code
  • Debugging Scala code
  • Building, testing, and distributing your Scala software
  • Mixing Java and Scala code
主站蜘蛛池模板: 铜梁县| SHOW| 桐梓县| 东乌| 罗甸县| 平原县| 宜兰市| 吴川市| 文水县| 镇巴县| 读书| 涟水县| 酉阳| 启东市| 富蕴县| 安泽县| 抚州市| 西峡县| 永州市| 高陵县| 蒙自县| 合水县| 武威市| 冷水江市| 神农架林区| 前郭尔| 思茅市| 成武县| 当涂县| 榆树市| 正镶白旗| 财经| 谢通门县| 隆子县| 林州市| 旅游| 册亨县| 沭阳县| 华容县| 江西省| 肥乡县|