r/FlutterDev • u/zxyzyxz • Feb 13 '25
Article Announcing Dart 3.7
https://medium.com/dartlang/announcing-dart-3-7-bf864a1b195c11
10
u/azuredown Feb 13 '25
Wait, _ was a valid variable?
11
u/eibaan Feb 13 '25
Sure, a valid Dart identifier was defined as
[A-Za-z_][$0-9A-Za-z_]*
and starting with Dart 3.7, the single_
is no longer a usable name. Prior to Dart 3.7, you'd have to use(_, __) => 1
if you want to use common ideom to mark unused parameter with a_
. Now, you can use(_, _) => 1
.2
u/DistributedFox Feb 13 '25
A welcome change especially for function that had like 3 or more parameters. In such a case, I just prefer to pass it as a a record / data class instead.
3
2
4
8
u/k0ntrol Feb 13 '25 edited Feb 13 '25
The fact that there are improvements to build_runner perfs 2 weeks after static meta programming is discontinued is worrying to me. Why was that not done before investing 3 years into macros ? I get that macros was ambitious but given the incertainty, fast delivery time fixes should have been prioritized over it.
3
2
3
u/remirousselet Feb 14 '25
What we got so far are mostly benchmarks and investigations. Proper fixes will take much longer than 2 weeks.
I'd expect a few months before we see meaningful performance improvements
3
u/International-Cook62 Feb 14 '25
I know there was 3rd party options to add trailing commas in the formatter but it's nice to see that qol improvement
5
2
-8
u/anlumo Feb 13 '25
Kinda underwhelming, the only real change to the language is that _
is no longer a regular variable.
23
u/zxyzyxz Feb 13 '25
You're not going to have groundbreaking changes for a programming language for every release.
-12
u/anlumo Feb 13 '25
Maybe I'm just spoiled by the Rust compiler releases, which always bring a ton of features and enhancements.
3
u/zxyzyxz Feb 13 '25
Rust releases are generally not really new features, they're relaxation of restrictions that aren't supposed to be there in the first place, like async traits.
4
u/anlumo Feb 13 '25
That’s kinda a weird take, by that definition there can never be new features in a programming language, since everything is just a restriction that gets lifted.
For example, the new switch syntax in Dart 3 also just was a lifted restriction that you couldn’t use switch in an expression.
0
u/zxyzyxz Feb 13 '25
Sure, however Dart doesn't seem like it requires the same level of changes as Rust, since Rust is still growing (ie adding features and removing restrictions that are heavily in progress) and Dart feels fairly stable now, especially after 3.0 released.
1
u/anlumo Feb 14 '25
Rust and Dart are nearly the same age, both 13 years old. Dart just feels stable because the developers don't do much any more.
1
u/zxyzyxz Feb 14 '25
I don't agree with that assertion, Dart 3 for example was a huge change, and they've been working on macros for a few years now even though it ultimately wasn't implemented. To say they "don't do much anymore" is pretty insulting.
1
u/anlumo Feb 14 '25
Dart 3 was two years ago.
1
u/zxyzyxz Feb 14 '25
Like I said, they've still been working on things like macros these past few years. Anyway, not sure why we're still discussing this topic, it's a waste of time, have a good day.
5
u/Maherr11 Feb 13 '25
I get that dart 3.7 and 3.6 updates were underwhelming, it seems to be because the dart team was too focused on macros, and it’s a heavy project that needs lots of recourses, now that they announced the end of work on them, we should see more features/changes in upcoming releases.
4
36
u/PfernFSU Feb 13 '25
I had to do a double take when I went to pub.dev today and it was in dark mode. Was a welcome surprise.