Provide f1 help for discards#59543
Conversation
Youssef1313
left a comment
There was a problem hiding this comment.
I opened the docs PR dotnet/docs#28241 :)
| return symbol != null; | ||
| if (symbol is IDiscardSymbol) | ||
| { | ||
| text = Keyword("_"); |
There was a problem hiding this comment.
I would prefer Keyword("discard") to make it clearer, and avoid future disambiguation on the docs side.
Also, how do you feel about handling IParameterSymbol where the name is _ because _ => goo(); is not a discard to the compiler, but probably is to the user
There was a problem hiding this comment.
I would prefer Keyword("discard") to make it clearer, and avoid future disambiguation on the docs side.
@BillWagner what do you think? I can see that we send punction for a lot of the symbols (like ?_CSharpKeyword). Would you prefer us to continue that here, os use a name like discard?
There was a problem hiding this comment.
Also, how do you feel about handling IParameterSymbol where the name is _ because _ => goo(); is not a discard to the compiler, but probably is to the user
I'll think about it, but i don't feel great about it :)
There was a problem hiding this comment.
Found when trying to help a community member out with discards. Tagging @BillWagner to ensure we have an appropriate doc this will link to.