美文网首页
反应式编程有什么好处

反应式编程有什么好处

作者: katkrazy | 来源:发表于2021-03-04 12:54 被阅读0次

    Callbacks are hard to compose together, quickly leading to code that is difficult to read and maintain (known as “Callback Hell”).

    Future objects are a bit better than callbacks, but they still do not do well at composition, despite the improvements brought in Java 8 by CompletableFuture. Orchestrating multiple Future objects together is doable but not easy. Also, Future has other problems:

    It is easy to end up with another blocking situation with Future objects by calling the get() method.

    They do not support lazy computation.

    They lack support for multiple values and advanced error handling.

    相关文章

      网友评论

          本文标题:反应式编程有什么好处

          本文链接:https://www.haomeiwen.com/subject/jvfkqltx.html