Leaf Petersen
Leaf Petersen
As an aside, are the cases there overlapping? Otherwise why not: ```dart return switch (expression) { case NamedExpression(:var expression): _isBlockFunction(expression); case MethodInvocation(:var target, argumentList: [var arg]): _isValidWrappingTarget(target) && _isBlockFunction(arg); case...
Corner case to consider/test for: ```dart int x = 3; void test(...) { switch(...) { case A(): case B(:int x): print(x); } } ```
Ok, I think this discussion broadened a bit, so let me try to summarize the issues raised. First, as I should have pointed out in my initial comment, this is...
> We don't do implicit downcast from `List` to `List` because the value might just _be_ a `List`. And we can't actually check the elements using a single cast. >...
> then I'll have a hard time explaining _why_. Fair enough. But there's no getting around this in general. For int to double conversions, 2 and 4 will never work....
Ok, this is good discussion, and nice to see a consensus developing. I have updated #2489 with a proposed specification for this that I believe reflects the intended static semantics...
This is, in my opinion, a must have. Everyone who ever programmed extensively in ML ended up writing their own [tuple update library](https://github.com/IntelLabs/flrc/blob/master/compiler/common/tuple.sml), and it was **the** feature that was...
> I suspect this is less of an issue in Dart where the language already gives you another way to relatively easily define incrementally-updatable aggregate types: classes. I don't think...
FWIW, F# has no problem with this: ```fsharp let myRecord2 = {| X = 1; Y = 2; Z = 3 |} let myRecord3 = {| myRecord2 with X =...
cc @munificent