Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

The current state of the art#

Sumit Rawal answered on May 23, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • The State of the Art
  • Problems in the current state of the art#

  • The current state of the art#

    0

    Within the Scala ecosystem, the Akka-HTTP library is a popular choice for implementing server-side backends for HTTP APIs. Another popular option is the Play framework, but using a full-blown web framework to just provide a thin API is an overkill in most cases. As most services need a database, the Slick library is another popular choice. This completes the picture of the current landscape. However, while all mentioned libraries are battle-tested and proven to work well, they still have a number of problems.

    Problems in the current state of the art

    In the domain of functional programming, our main goal is referential transparency, which we define in the following way:

    An expression e is referentially transparent if we can replace any occurrences of e in any given program with the result of the evaluation of e without changing the behavior of the program.

    Building on that, we need pure functions which are:

    Only dependent on their input

    Have no side effects

    This means that our functions will be referentially transparent.

    However, the above-mentioned libraries are built upon Future from Scala, which uses eager evaluation and breaks referential transparency.

    Let’s look at an example.

    Popularity 1/10 Helpfulness 1/10 Language scala
    Source: Grepper
    Tags: scala state
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.