Structual records? #2750
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
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
struct
s, as a convenience, but not to replace them.The text was updated successfully, but these errors were encountered: