dart-lang / dart-lang/language

Should implicit constructors be introduced at the same time of introduction of inline classes?

Open
#3,183 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

Without implicit constructors,
```dart
inline class MyInt(int _) implements int;

void main() {
var mi = MyInt(10);
mi = MyInt(mi * 2);
}
```

With implicit constructors,
```dart
inline class implicit MyInt(int _) implements int;

void main() {
MyInt mi = 10;
mi *= 2;
}
```

cf. #108 #309

Contributor guide

Open the contributing guide

Research direction

Compare the two inline-class examples and the related issues #108 and #309. Determine whether implicit constructors should be introduced with inline classes, and define the desired syntax and behavior before implementation.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.