Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dart style recommendation for wild cards #6446

Open
mit-mit opened this issue Feb 20, 2025 · 4 comments · Fixed by #6432 · May be fixed by #6456
Open

Update dart style recommendation for wild cards #6446

mit-mit opened this issue Feb 20, 2025 · 4 comments · Fixed by #6432 · May be fixed by #6456
Assignees
Labels
a.effective-dart Relates to the best practices explained in Effective Dart a.language Relates to the Dart language tour e1-hours Can complete in < 8 hours of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month.

Comments

@mit-mit
Copy link
Member

mit-mit commented Feb 20, 2025

Dart 3.7 added new support for wild card variables. With that we should probably update this style recommendation?

https://dart.dev/effective-dart/style#prefer-using-_-__-etc-for-unused-callback-parameters

@parlough parlough added a.effective-dart Relates to the best practices explained in Effective Dart a.language Relates to the Dart language tour p1-high Major but not urgent concern: Resolve in months. Update each month. e1-hours Can complete in < 8 hours of normal, not dedicated, work labels Feb 21, 2025
@parlough
Copy link
Member

A contributor opened a PR to make updates here and Marya is pondering some other changes as well: #6432 (comment)

@MaryaBelanger
Copy link
Contributor

@mit-mit if you could weigh in on that PR with how you think it should be handled that would be great!

@mit-mit
Copy link
Member Author

mit-mit commented Feb 21, 2025

I defer to Bob for the style guide, but I think we should consider to document the latest language as the default. We could add a version note for the older style, but perhaps even that isn't needed?

@MaryaBelanger
Copy link
Contributor

Reopening this in case we want to make more changes. Currently, we've just added the note from #6432 (which closed this issue), but we should probably still change the entry all together.

Parker had a good idea to change the title of the section to: "PREFER using wildcards for unused callback parameters", which I think is the best idea too. That would require a little rewriting of the of the text in the section too, and maybe result in removing the new version note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.effective-dart Relates to the best practices explained in Effective Dart a.language Relates to the Dart language tour e1-hours Can complete in < 8 hours of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month.
Projects
None yet
3 participants