[Pitch] - Add @Indirect to the standard library

Indirect structures would have two big advantages over classes:

  1. Indirect types are value types, which are heavily preferred in Swift over reference types like classes because they're easier to reason about and less prone to bugs.
  2. Indirect instances don't have an object identity, so they’re easier to optimize. Class instances are more difficult to optimize because they have to support === and !== identity checks.
2 Likes