Feature Request - Volatile or Macro class with Dynamic base class #2382
Unanswered
ackava
asked this question in
Language Ideas
Replies: 1 comment
-
This is sounding like some sort of mixin support. |
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.
-
The idea seems little strange, but there are various practical uses. Most of the time we implement same logic in many classes just because they are inherited from different classes. Let's assume a simple UI related logic, I want to write a OnClick tracking for couple of classes (I know, this can be done with event handlers, but its not the point, there may be classes without event handlers, non UI classes). They are TextBox, ComboBox, ListBox. Now all these classes already exist in framework. I have to create MyTextBox, MyComboBox and MyListBox.
And in each class I write same logic, ... track onclick. I create a ClickTracker class and create instance of ClickTracker as follow,
Not only implementation is time consuming but there is already lot of parameter passing.
If there was a way like...
or we can have some alternative syntax like
or
Volatile class properties
It does not appear in reflection
Beta Was this translation helpful? Give feedback.
All reactions