Add contextualized examples to the 'Pattern types' page #5425
Labels
a.language
Relates to the Dart language tour
dev.patterns
Relates to the patterns language feature
e3-weeks
Complete in < 4 weeks of normal, not dedicated, work
fix.examples
Adds or changes example
from.page-issue
Reported in a reader-filed concern
p.pattern-types
p3-low
Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.
Page URL
https://dart.dev/language/pattern-types
Page source
https://github.com/dart-lang/site-www/blob/main/src/content/language/pattern-types.md
Describe the problem
Pattern doc is very weak.
Examples are out of context, it is difficult to figure out real scenario of almost all of the patterns, for example "Logical-and" example looks 100% artificial and use-less.
Inline comments are missing for code examples.
Honestly, I used ChatGPT to convert such non-human doc to the doc average human can understand.
Expected fix
No response
Additional context
No response
I would like to fix this problem.
The text was updated successfully, but these errors were encountered: