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

Chapter 1. Embrace the Truth

The history of functional programming can be traced back to the Church and Rosser's original work on Lambda Calculus in 1936 and yet, the concepts and implementation of this important programming paradigm are somehow limited to academia while its object-oriented and imperative counterpart dominates the industry. Good news is, this trend is changing fast! With the functional paradigm support in modern programming languages, such as Scala, Clojure, F#, Ruby, and to some extent, the omnipresent JavaScript, the benefits of functional programming are being realized. The increased use of some classical functional languages, such as OCaml, Erlang, Scheme, and Lisp in high-concurrency environments has led to realization of the functional advantages of brevity, terseness, scalability and performance.

In this chapter, we will cover everything that a hobbyist F# developer, who is just starting his/her adventure in functional programming, needs to know in order to be able to follow the discussion through rest of the book. We will begin with a short explanation of F# language's rather special role in the functional programming world, and will explain why it isn't strictly a functional programming language. Throughout the book, and in this chapter particularly, we will address the historic sketches of functional languages and their predecessors. We will discuss F# language's roots in ML, the context in which F# works, that is, running on top of .NET stack, compiled to IL, utilizing BCL, and the hybrid nature of the languages. You will see several new terms used in this and the following chapters; these terms will have a cursory definition, but will be elaborated on as we discuss these topics in detail during subsequent chapters.

By the end of this chapter, you will be familiar with a brief history of functional programming. With comparative code examples, we will analyze code samples using mutable, and immulatable data structures as well as imperative control flow syntax that will allow you, the reader, to fully understand and embrace the hybrid nature of F#.

In this chapter, we will cover the following topics:

  • A brief overview of Functional Programming Paradigm
  • Thinking functional—why functional programming matters
  • The F# language primer
  • Benefits of functional programming and functional data structures
  • Code samples comparing imperative and functional styles
主站蜘蛛池模板: 海淀区| 莱州市| 德保县| 江门市| 康保县| 通道| 沽源县| 山丹县| 咸阳市| 黄梅县| 微山县| 鞍山市| 阿拉尔市| 白朗县| 吉安县| 宣武区| 凤台县| 海原县| 抚松县| 彩票| 蒙阴县| 苏尼特左旗| 元江| 昭觉县| 綦江县| 达拉特旗| 沙洋县| 思茅市| 庆安县| 武鸣县| 湟源县| 栾城县| 常熟市| 江源县| 杂多县| 保定市| 陈巴尔虎旗| 邳州市| 汾阳市| 云梦县| 永春县|