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

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
主站蜘蛛池模板: 鸡西市| 水富县| 贵州省| 灵川县| 丹寨县| 张家川| 尖扎县| 许昌市| 藁城市| 宣汉县| 海丰县| 乐安县| 外汇| 剑河县| 于都县| 苏尼特右旗| 庄河市| 肥乡县| 东莞市| 阿巴嘎旗| 舞钢市| 丰宁| 广元市| 盱眙县| 金秀| 云浮市| 响水县| 昌宁县| 略阳县| 东台市| 郑州市| 扶风县| 柳林县| 北流市| 五寨县| 油尖旺区| 吉水县| 大冶市| 水城县| 永兴县| 如皋市|