dart-lang / dart-lang/language
Specification: Define well-formed mixins
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
The language specification uses the notion of a well formed mixin without ever defining it:
> It is a compile-time error if a well formed mixin cannot be derived ..
We could probably specify that the mixin composition operation (`\ref{mixinComposition}`) may succeed or fail (based on whether or not the class definitions that it gives rise to have any compile-time errors), and then we must specify at each usage of this mechanism that it is a compile-time error of the relevant declaration if the mixin composition fails.
The apparently simpler alternative of specifying once and for all that it is a compile-time error if any of said class definitions has a compile-time error won't quite work, because that makes it rather hard to discover in the context where mixin composition is used that anything could go wrong, and exactly which part of the source could should be blamed for that failure.
Contributor guide
Assessment
This issue has not been assessed yet.