-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Suggestion Backlog Slog, 2/1/2020 #42591
Comments
@RyanCavanaugh what's a good link to divergent getters/setters? |
@DanielRosenwasser Just out of curiosity, what's the criteria for getting an issue to be discussed in one of these sessions? Is it just random? "Looks interesting" to one of the team? Popularity in terms of votes/something else? Maybe issue creation time, even? 😛 Assuming it doesn't already exist... Is there any potential for a periodic (monthly, quarterly, etc.) community vote on suggestions for the team to discuss? Such a vote may help surface some of the more niche suggestions, and perhaps even get them into "Accepting PRs" status. It could also be a good way for the community to get the team's actual thoughts on some of the more, uhh, interesting features, e.g. higher-kinded types, decorators changing class type structure, nominal types, compiler plugin API, etc. Thoughts? 🙂 |
@treybrisbane |
Most weeks it's "issues that caught the organizer's eye", but we rotate criteria and review highly-upvoted suggestions regularly; usually the outcome is "We still can't / don't know how to without tanking performance / don't like the implications of doing this" and no notes are taken. We're looking at ways to make this more community- and data-driven without encouraging artificial behavior. |
Sure. But most of us have very limited free time, and it can be difficult to justify investing that time into PRs that the team may not accept or have time to review. Having issues explicitly marked as "Accepting PRs" means any time investment on the community's part is no longer a gamble. 🙂
That's a very deep rabbit hole that we probably should not go down in this thread. 😅 |
@RyanCavanaugh Thanks for the reply. Makes sense. Keen to see what you come up with! 🙂 |
Divergent Getters and Setters
set foo(val: string)
,get(): Promise<string>
is suspect - should getter be subtype of setter?string | Promise<string>
>?get
≤set
for now.where
constraint syntax#42388
Idea: additional checks are to not participate in inference.
Validation between type parameters.
The syntax is pretty hard - no clear separation. The
where
looks like it continues the current parameter list.such that
wherefore art thou type parameter T
What's the difference between this and C#?
We have the notion that every type parameter has a constraint.
Those constraints inform what you can do with values of that type parameter.
What do these
where
constraints imply about their values?Unclear.
T, U, T extends U
could be surprising.Also, we do inform the inference process using the upper bound constraint.
It is strange to have a notion of constraints that don't communicate anything about the upper bound.
What are we trying to model?
Okay, mutable collections and elements.
Really want to model "don't infer a type from this position."
The text was updated successfully, but these errors were encountered: