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

What is functional programming?

Functional programming is a programming paradigm that has gained a lot of popularity since 2010. In the last few years, many functional frameworks or libraries have appeared in many programming languages, and functional languages have seen a rise in interest. Functional programming is not a new programming paradigm, but getting into it from a theoretical perspective can be intimidating.

The world of functional programming is full of new terms (such as monoid, monad, currying, purity, and higher-order function) that can seem difficult to comprehend, and some of them come with different definitions depending on the source of the information. But functional programming has some very interesting benefits:

  • Functional code is deterministic, with behavior that can (at least in theory) be proven
  • Functional code can isolate side effects from the pure program logic
  • Functional code makes testing easier

The good news is that one does not have to study functional programming in depth in order to benefit from this paradigm, nor to use a functional language. Many modern programming languages support some functional features and allow you to write functional code. So, it is possible to get the benefits of deterministic code and easier testing by only using some of the elements of functional programming.

主站蜘蛛池模板: 荥经县| 阳江市| 江华| 四平市| 邮箱| 临沧市| 会同县| 昌图县| 翁牛特旗| 兴海县| 五华县| 哈巴河县| 固始县| 刚察县| 瑞安市| 开江县| 綦江县| 库尔勒市| 瑞金市| 东乡族自治县| 巴楚县| 阜宁县| 四子王旗| 浦东新区| 郁南县| 弋阳县| 郴州市| 丹江口市| 黄山市| 巴林右旗| 玉屏| 乃东县| 东兰县| 盐城市| 柏乡县| 托里县| 雷波县| 会泽县| 永定县| 大港区| 盈江县|