Skip to content

feat(compiler)!: Convert box from a tuple to a record - #2402

Open
spotandjake wants to merge 1 commit into
oscar/gc-rebasedfrom
spotandjake/box-record
Open

feat(compiler)!: Convert box from a tuple to a record#2402
spotandjake wants to merge 1 commit into
oscar/gc-rebasedfrom
spotandjake/box-record

Conversation

@spotandjake

Copy link
Copy Markdown
Member

This pr changes the internal representation of the Box<a> type from a single value tuple to a record.

The main advantage of this change is we can now pattern match on the raw record { _value } to pattern match on records directly.

I chose the name _value because it's easy to use but the _ should help keep it from conflicting with user records.

The snapshot changed because we added a new identifier which changed the ordering.

I'm pretty sure this is considered breaking given we are changing an internal data structure, but from a user facing perspective because we never previously exposed the underlying tuple nature this shouldn't break any existing code outside of the runtime.

Closes: #2308

This pr changes the internal representation of the `Box<a>` type from a single value tuple to a record.

The main advantage of this change is we can now pattern match on the raw record `{ _value }` to pattern match on records directly.

I chose the name `_value` because it's easy to use but the `_` should help keep it from conflicting with user records.

The snapshot changed because we added a new identifier which changed the ordering.

Closes: #2308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant