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

[3.7] Document language feature inference-using-bounds #6258

Open
MaryaBelanger opened this issue Dec 6, 2024 · 2 comments · May be fixed by #6403
Open

[3.7] Document language feature inference-using-bounds #6258

MaryaBelanger opened this issue Dec 6, 2024 · 2 comments · May be fixed by #6403
Assignees
Labels
a.language Relates to the Dart language tour dev.type-system Relates to the type system in Dart e2-days Can complete in < 5 days of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.

Comments

@MaryaBelanger
Copy link
Contributor

Design doc here: https://github.com/dart-lang/language/blob/main/accepted/future-releases/3009-inference-using-bounds/design-document.md

To do: evaluate

@MaryaBelanger MaryaBelanger self-assigned this Dec 6, 2024
@eernstg
Copy link
Member

eernstg commented Dec 9, 2024

In the documentation of the inference-using-bounds feature it definitely seems useful to have a reference to @chloestefantsova's document.

It gets more complex when it comes to the general documentation of inference. I don't really have a complete idea about what could be done, but it seems likely to me that the graphs could be used to illustrate the treatment of a non-trivial case (the treatment after the change), and the general reader could benefit from that (with some text which could be very similar to the text in the document, I think). The "before" variant could be omitted here, because it's intended to describe how inference works (not how it was changed in order to add the inference-using-bounds feature). Does that make sense?

@parlough parlough added a.language Relates to the Dart language tour p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. e2-days Can complete in < 5 days of normal, not dedicated, work dev.type-system Relates to the type system in Dart labels Dec 19, 2024
@MaryaBelanger
Copy link
Contributor Author

MaryaBelanger commented Feb 6, 2025

I don't think I'm going to have time to do the needed full-inference-page overhaul, unfortunately. But here's my notes for inference using bounds:

  • add a sub-section to the Restricting the parameterized type section of the Generics page, to introduce the concept of F-bounds / recursive type definition relationship
  • add a section about inference using bounds / constraint generation based on bounds under the Type argument inference section of the Type system page
  • Link between the two for reference

I'll probably also be adding a summary of the feature to the release blog post for 3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.language Relates to the Dart language tour dev.type-system Relates to the type system in Dart e2-days Can complete in < 5 days of normal, not dedicated, work p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants