Timeline for Class inheritance design with protected methods and run time base handlers
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 10 at 7:30 | comment | added | CodeMonkey | The code in the example is a shorten pseudo code but its exactly how the real one looks. Can you just look at the edit as a totally new question instead of thinking of it as clarification? | |
Feb 10 at 7:25 | comment | added | Doc Brown | @CodeMonkey: I still think your code examples are too contrived, and nothing in your extra explanation has changed this So it is up to you to transfer the suggestions I made to your real code, the parts of which I could only make blind guesses how it looks like . The gist of my answer is, when you want to change certain behaviour in a context-dependend manner, consider to use a more functional approach and make the actions which are different functional parameters. | |
Feb 9 at 21:32 | comment | added | CodeMonkey | Yeah I initially thought of maybe adding another handler member just for the action but passing it as a parameter is cleaner. Even though it does seem that the answer can be applied, I believe you did it based on my initial thoughts of how to solve the issue I display in my edit. But let's say you only saw the edit itself as the question without the first part, you might have a better idea of how to design the system to answer that need displayed there? | |
Feb 9 at 20:31 | comment | added | Doc Brown | @CodeMonkey: yes, but did you read my answer? Nothing in your extra explanation tells me my answer cannot be applied to it. | |
Feb 9 at 17:32 | comment | added | CodeMonkey | Did you see the edit? | |
Feb 9 at 7:35 | history | edited | Doc Brown | CC BY-SA 4.0 |
added 299 characters in body
|
Feb 9 at 7:33 | comment | added | CodeMonkey | I edited the question with a more detailed explanation. Hopefully it clears up the mess | |
Feb 9 at 7:21 | history | answered | Doc Brown | CC BY-SA 4.0 |