What's the rationale behind not inheriting static variables, in Dart? What's the rationale behind not inheriting static variables, in Dart? dart dart

What's the rationale behind not inheriting static variables, in Dart?


Yes, there's no inheritance of static members. See Static Methods section of the language specification :

Inheritance of static methods has little utility in Dart. Static methods cannot be overridden. Any required static function can be obtained from its declaring library, and there is no need to bring it into scope via inheritance. Experience shows that developers are confused by the idea of inherited methods that are not instance methods.

Of course, the entire notion of static methods is debatable, but it is retained here because so many programmers are familiar with it. Dart static methods may be seen as functions of the enclosing library.