Matthew McDonald

Results 66 comments of Matthew McDonald

I'm confused by the following: > In Dart, function types can be _explicitly_ declared based on context. What does this mean? What context? > Here is an example of declaring...

> So should I mention this "Function Type" directly to [built-in-types-page](https://dart.dev/language/built-in-types) ? I think just a link in the bulleted list should be enough here. Same thing is done for...

@sfshaza2 The PR hasn't been updated to account for the feedback. I think the following changes should be made: 1. The explanation of function types should be closer to what...

> But the enum value _syntax_ is awesome. Maybe we could consider allowing any class-like type declaration to declare constants. Maybe > ```dart > extension type Foo(Bar _) { >...

> Mixins, abstract and sealed classes could work with const factory constructors (if we haven't allowed mixins to have factory constructors yet, we should). Fair enough regarding abstract and sealed...

This does seem like an obvious fit for const expressions. ```dart const r = (x: 1, y: 2); const x = r.x, y = r.y; ``` It might even be...

Is this essentially #1610 with extra features like "non-instance member overrides"? A question about this example: ```dart int foo(int x); override // Override must be marked as `override`. int foo(int...

> And yes, you can declare an "abstract" member signature in a non-abstract class, as long as the member has an implementation. The change here is that now the implementation...

> Declare something which is _only_ a namespace: > ```dart > namespace Name { > // members > } > ``` Is upper camel case the preferred casing for namespaces?...

I was referring to the type declaration for a `Function`. ```dart int add(int a, int b) => a + b; int Function(int, int) f = add; ``` In the above...