proposal: Add member access to structure generics #73012
Labels
LanguageChange
Suggested changes to the Go language
LanguageChangeReview
Discussed by language change review committee
Proposal
Milestone
Go Programming Experience
Experienced
Other Languages Experience
C/C++, JavaScript
Related Idea
Has this idea, or one like it, been proposed before?
No
Does this affect error handling?
No
Is this about generics?
Yes.
~[]E
) can have its member accessed, but not struct type.Proposal
Allow mamber access for generic struct type values.
Language Spec Changes
This will allow mamber access for generic struct type values.
Informal Change
No response
Is this change backward compatible?
Yes. This is a brand-new concept.
Orthogonality: How does this change interact or overlap with existing features?
No response
Would this change make Go easier or harder to learn, and why?
Easier. The error "r.Pix undefined (type I has no field or method Pix)" will not exist anymore.
Cost Description
No response
Changes to Go ToolChain
No response
Performance Costs
No response
Prototype
No response
The text was updated successfully, but these errors were encountered: