You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Support dedicated choice types (remove syntactic sugar), add support for switch expressions, support accessing common attributes with ->, and support (de)serialisation with @type (except for basic types).
A couple of things change at this point.
A basket can now directly be passed to a function expecting an asset, instead of wrapping it in Asset { basket: basket, ... }. The Asset {...} constructor syntax disappears.
Accessing common attributes in choice types changes from ->> to ->. For one-of types, the ->> syntax stays the same.
Discriminating a choice type now must happen by using a switch. All checks of the form if asset -> basket exists then will need to be refactored. E.g.,
asset switch
Basket then <item is now of type Basket>,
Loan then <item is now of type Loan>,
Security then <item is now of type Security>,
default then <optional default case>
Nested choice types are flattened out.
Serialisation becomes less nested. E.g., what used to be
See part 3 of #747 (comment).
The text was updated successfully, but these errors were encountered: