Introduce "pass" keyword #7709
Unanswered
Audionysos
asked this question in
Language Ideas
Replies: 2 comments
-
This can be achieved with a source generator. I don't think you need a keyword for this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
See: #1007 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A "pass" keyword would specify a property which only purpose is to be a shortcut to a member of some other object.
For example, instead of writing this:
You would write this:
Or if you want the same name just:
I would suggest that the accessors would be public as default (private pass would make no sense, maybe besides making abbreviations...) and you could change it like this:
Of course the accessors would be made available only if the target type exposes them - if the button state class looks like this:
the
pass => states[0].size;
would only create theget
accessor.I think you get the idea.
Beta Was this translation helpful? Give feedback.
All reactions