1. 03 Apr, 2020 4 commits
  2. 02 Apr, 2020 3 commits
  3. 31 Mar, 2020 2 commits
    • Dominik Charousset's avatar
      Re-implement result<...> as sum type · b5d446af
      Dominik Charousset authored
      The `result` class predates the sum type API in CAF and used a flag for
      selecting one of several members. Re-implementing the class with a
      `variant` instead is both cleaner and more idiomatic.
      
      Furthermore, the implementation for `result` now uses a base type that
      wraps state as well common constructors. The class `result` is merely a
      thin wrapper around the base with additional constructors. For example,
      results with a single template parameter allow conversion from
      `expected`. This fixes #989 by avoiding catch-all constructors and
      unreliable `enable_if` magic.
      b5d446af
    • Dominik Charousset's avatar
      Remove composable_behavior · 4406ed26
      Dominik Charousset authored
      The composable behavior was intended to make actor states re-usable.
      However, they turned out to not deliver on that promise.
      
      One major flaw in this approach comes from the way inheritance works in
      C++. In a scenario with multiple base types providing the same virtual
      function, overrides in one base type may not override all functions for
      that signature. Consider the following example:
      
      ```c++
      struct foo {
          virtual void hello() = 0;
      };
      
      struct bar {
          virtual void hello() = 0;
      };
      
      struct a : foo {
        void hello() override {
            // nop
        }
      };
      
      struct b : bar, a {
      
      };
      
      int main(int, char **) {
          b obj; // ... oops: compiler error!
      }
      ```
      
      This rarely becomes an issue in most C++ code. However, it's very easy
      to run into this compiler error using the composable behaviors by
      implementing overlapping typed actor handles.
      
      Aside from this subtle issue, compiler errors produced by the composable
      actor API turned out to be very hard to parse. Getting a handler
      signature wrong or missing an override quickly turns into guess games.
      
      Last but not least, the `caf::param` API became a necessary evil to
      support actors that may or may not require mutable access to a tuple.
      But it adds another layer of complexity as well as runtime overhead.
      
      The idea of implementing actors with re-usable pieces is still worth
      pursuing, but this experiment did not pay out.
      4406ed26
  4. 29 Mar, 2020 6 commits
  5. 28 Mar, 2020 2 commits
  6. 27 Mar, 2020 1 commit
  7. 26 Mar, 2020 1 commit
  8. 25 Mar, 2020 3 commits
  9. 24 Mar, 2020 1 commit
  10. 23 Mar, 2020 5 commits
  11. 21 Mar, 2020 1 commit
  12. 19 Mar, 2020 5 commits
  13. 18 Mar, 2020 6 commits