language icon indicating copy to clipboard operation
language copied to clipboard

Design of the Dart language

Results 567 language issues
Sort by recently updated
recently updated
newest added

The spec currently includes file access https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md#resources it either needs splitting out of the feature, or implementing :)

The language currently allows labels on switch cases. Then you can use a `continue` followed by a label name to jump from one case to any other chosen case in...

question
breaking-change

I would like to propose new semantics for RAII in Dart. For a class to be a resource, it should be annotated as `resource`, which requires the `dispose` method. For...

feature

Here `ancestor` has initially type `Element?`, so cannot be promoted to either `ClassElement` or `ExtensionElement`. But it cannot be `null` if any of them is true. ```dart var ancestor =...

request
feature
nnbd
flow-analysis

Allow declaring a class in the body of another class. ```dart class Person { class Occupation { String jobTitle; Occupation(this.jobTitle); String named(String name) => moniker(Person(name, this)); } String name; Occupation...

feature

Today if I have two libraries that export classes with the same name, we get `ambiguous_import` if we try to use it. The suggested workarounds are to add an alias...

feature

I'm not suggesting we don't add augmentations to the language. I just found this approach interesting enough that I want it documented, in case we ever reconsider. @mit-mit mentioned this...

feature

I think it could be really interesting if we could create our own generators like `async`, `async*`, and `sync*` I noticed that really, a lot of the features present in...

feature

**TL;DR**: All instance variables with initializer expressions of a class definition are initialized first thing, before invoking any non-redirecting generative constructor code. The the non-redirecting generative constructor code is executed...

feature
augmentation-libraries

Thanks to @sgrekhov for bringing up this situation. It is currently a [compile-time error](https://github.com/dart-lang/language/blob/aa8ee9d17b6c1c345ed7fb23a96c8c742cfcbe5c/specification/dartLangSpec.tex#L2416) for a named parameter to have a name whose first character is `_`. ```dart void f({int...

question