←back to thread

97 points appliku | 1 comments | | HN request time: 0.336s | source
Show context
vips7L ◴[] No.45159540[source]
Maybe I’m not getting it, but isn’t this just interfaces and implementations from the OO world? For example their movie one is:

    interface MovieApi {
        List<Movie> getPopularMovies();
    }
    
What are effects providing over this?
replies(5): >>45159701 #>>45159720 #>>45160356 #>>45162050 #>>45194243 #
1. vjerancrnjak ◴[] No.45194243[source]
Flix does not have generic effects, yet it has generic traits.

This hints that effects are not meant to deal with data variability.

Effects are allowing variability of control flow.

Abstracting `try/catch/finally` or `async/await`.

For example, something like "durable workflows" is just a specific effect implementation, code stays the same.