Wdestroier

Results 27 comments of Wdestroier

Sometimes I feel like the parenthesis are extra unnecessary code, let's say, compared to Golang. Example: `int, int getOrigin() { return 0, 0; }` vs `(int, int) getOrigin() { return...

>`Record concat(Record a, Record b) => (...a, ...b); // Not allowed!` Shouldn't it be possible to spread records even if they're represented by a dynamic type? `concat(a, b) => (...a,...

Can records be created during runtime? ```dart void handleWebSocket(WebSocket webSocket) { webSocket .map((string) => decodeJson(string)) .listen((message) { var echo = message.echo; print("Message to be echoed: $echo"); var response = encodeJson((response:...

Could it be possible to allow the IDE to convert from a primary constructor to a normal constructor? Such as CTRL + . >> Move constructor to class body. Could...

Amazing @srawlins! My only suggestion would be to not make `parseWithSeparators` and `tryParseWithSeparators` part of the public SDK. Assuming `tryParseWithSeparators` is a more optimized equivalent of `int.tryParse(text.replaceAll('_', ''))`.

> There are probably other workarounds, possibly making factory at least a contextual keyword, but this is short and doesn't require much new syntax. Would be great to make `factory`...

@Levi-Lesches This feature request should effectively add the only method reference expression Java has and Dart doesn't yet, right? ![image (1)](https://github.com/dart-lang/language/assets/14764307/5ecf46b1-7392-4371-a87c-bea323da0e6d) https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html

@subzero911 Do you think `var x = if (a > 0) 1 else if (b < 10) 2 else 3;` is any better? Maybe we can solve the "ternary hell"...

A syntax for range to/until or extension methods would help a lot to reduce boilerplate and time spent writing algorithms on the web. Packages can't be imported and the copy-paste...

I remember reading a request to omit the `var` keyword in _for-in_ loops. Replacing `for (var c in callbacks) {}` with `for (c in callbacks) {}` probably isn't a huge...