- Reactive Programming in Kotlin
- Rivu Chakraborty
- 293字
- 2021-07-02 22:26:38
Introducing functional programming
So, functional programming wants you to distribute your programming logic into small pieces of reusable declarative small and pure functions. Distributing your logic into small pieces of code will make the code modular and non-complex, thus you will be able to refactor/change any module/part of the code at any given point without any effects to other modules.
Functional programming requires some interfaces and support from the language, thus we can't say any language is functional unless it gives some sort of support to implement functional programming. However, functional programming isn't something new; it is actually quite an old concept and has several languages supporting it. We call those languages functional programming languages, and the following is a list of some of the most popular functional programming languages:
- Lisp
- Clojure
- Wolfram
- Erlang
- OCaml
- Haskell
- Scala
- F#
Lisp and Haskell are some of the oldest languages and are still used today in academia and industry. While talking about Kotlin, it has excellent support for functional programming from its first stable release in contrast to Java, which doesn't have any support for functional programming before Java 8. You can use Kotlin in both object-oriented and functional-programming style or even in a mix of two, which is really a great benefit for us. With a first-class support for features, such as higher-order functions, function types, and lambdas, Kotlin is a great choice if you're doing or exploring functional programming.
The concept of functional reactive programming (FRP) is actually a product of mixing reactive programming with functional programming. The main objective of writing functional programming is to implement modular programming; this modular programming is really helpful, or sometimes a necessity to implement reactive programming or rather to implement the four principles of the Reactive Manifesto.
- 我們都是數(shù)據(jù)控:用大數(shù)據(jù)改變商業(yè)、生活和思維方式
- Access 2016數(shù)據(jù)庫(kù)技術(shù)及應(yīng)用
- Python醫(yī)學(xué)數(shù)據(jù)分析入門(mén)
- Remote Usability Testing
- 跟老男孩學(xué)Linux運(yùn)維:MySQL入門(mén)與提高實(shí)踐
- ZeroMQ
- 辦公應(yīng)用與計(jì)算思維案例教程
- Hadoop大數(shù)據(jù)開(kāi)發(fā)案例教程與項(xiàng)目實(shí)戰(zhàn)(在線(xiàn)實(shí)驗(yàn)+在線(xiàn)自測(cè))
- Python數(shù)據(jù)分析從小白到專(zhuān)家
- 活用數(shù)據(jù):驅(qū)動(dòng)業(yè)務(wù)的數(shù)據(jù)分析實(shí)戰(zhàn)
- Spring MVC Beginner’s Guide
- Unity Game Development Blueprints
- Microsoft Dynamics NAV 2015 Professional Reporting
- 精通Neo4j
- Machine Learning for Mobile