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

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.

主站蜘蛛池模板: 云浮市| 镇赉县| 长子县| 澎湖县| 梅州市| 鸡东县| 土默特左旗| 霍邱县| 海林市| 兖州市| 抚顺县| 宜阳县| 安仁县| 阿克| 合肥市| 富源县| 栾城县| 阜新市| 东台市| 黄山市| 孝感市| 余姚市| 青州市| 湖北省| 高雄市| 张家川| 阆中市| 丹寨县| 招远市| 北宁市| 贡觉县| 凯里市| 湘乡市| 大兴区| 百色市| 安吉县| 图木舒克市| 海南省| 广丰县| 郁南县| 巴彦淖尔市|