Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structual records? #2750

Closed
Centril opened this issue Sep 7, 2022 · 0 comments
Closed

Structual records? #2750

Centril opened this issue Sep 7, 2022 · 0 comments
Labels
bikeshedding For bikeshedding trivialities language feature Core language features visible to end users Needs RFC Features that require an RFC before proceeding with an implementation

Comments

@Centril
Copy link
Contributor

Centril commented Sep 7, 2022

The idea here is that we would add structural records to the language.

I proposed this initially as an addition to Rust (see rust-lang/rfcs#2584), but it was never added, mainly due to a large backlog of other features to implement.

The proposed syntax is exactly as that in Rust, in expression, pattern, and type contexts alike.
So for example, you could write { foo: 42, bar: true, baz: "abcd" },
and this would be typed as { foo: u64, bar: bool, baz: str[4] }.
Note that structural records would be added alongside structs, as a convenience, but not to replace them.

@Centril Centril added bikeshedding For bikeshedding trivialities language feature Core language features visible to end users Needs RFC Features that require an RFC before proceeding with an implementation labels Sep 7, 2022
@IGI-111 IGI-111 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bikeshedding For bikeshedding trivialities language feature Core language features visible to end users Needs RFC Features that require an RFC before proceeding with an implementation
Projects
None yet
Development

No branches or pull requests

2 participants