dart-lang / dart-lang/language
Record feature requests
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
Hello. Giant thank you to everyone that worked on patterns and records. Those features made me fall in love with Dart again and seeing the direction in which the language moves is beautiful.
After toying around with records specifically, I thought about a few possible features. I have not thought about all the pitfalls and both of them are very open to discussion, as I may have missed something.
1. Subtyping, such that the following code would be allowed:
```dart
void acceptA((int one,) a) {}
acceptA((1, two: 2));
```
2. Type spread for records:
```dart
typedef A = (int first,);
typedef B = (...A, {int second}); // (int first, {int second})
```
Contributor guide
Research direction
Start by reviewing the two proposed Dart record features and the existing issue discussion. No implementation files, tests, or entry points are identified; the work is complete only after the language-design questions are resolved and an agreed specification or implementation path is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100