Open
Description
One of the the great features of OO languages is polymorphism based on known interfaces.
Unfortunately, Dart has neglected to define interfaces that are standard in other SDKs. This makes it impossible to write generic libraries without casting objects to dynamic and try to call a method hoping it will be available, therefore hurting type safety.
The two most missed ones are probably
- Disposable
- Serializable
But I'm sure there might be some more. Thanks to mixins it should be possible to introduce such interfaces even today into existing classes of the Dart SDK, Flutter and all packages where it makes sense and improve the situation.
cc @FMorschel