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

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.

主站蜘蛛池模板: 洱源县| 公安县| 宜春市| 黄陵县| 沁源县| 上饶县| 甘泉县| 宜宾市| 都匀市| 阜康市| 竹北市| 新疆| 温泉县| 乌拉特中旗| 肃北| 五峰| 永川市| 青田县| 满洲里市| 佛教| 阿拉尔市| 远安县| 阿拉善左旗| 太白县| 瓮安县| 通榆县| 吉木乃县| 宝坻区| 合川市| 嵊州市| 弋阳县| 青川县| 集贤县| 札达县| 菏泽市| 石棉县| 齐齐哈尔市| 读书| 安阳县| 灵武市| 宁化县|