You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An idea from Dscho:
"Continue the (good!) idea of ResultHandler, but simplify it first.
eg: Why does every method in ResultHandler repeat that it handles something?"
I see what he means:
void handleWarning(Warning warning);
could just be
void warning(Warning warning);
but maybe that's too little information as method names should be verbs...
so maybe this one is just a matter of taste...
processWarning
dealWithWarning
showWarning
useWarning
or maybe I miss the point...?
The text was updated successfully, but these errors were encountered:
void handleWarning(Warning warning);
could just be void warning(Warning warning);
but maybe that's too little information as method names should be verbs...
And, to think,
I thought you might not be watching @dscho
!!!
Warn()
Certainly makes 100% sense!
But what about
handleResult()
?
Why is it so bad to have methods called handle in handler Interface? Does it go against some code style or logical way of thinking? Seems reasonable to me... But then again, I'm no object oriented design boffin.
lurking is the more appropriate word here... If I were actually active in this project, your concerns would all be addressed by now 😏
Why is it so bad to have methods called handle in handler Interface?
It is a bad habit to acquire. Repetition makes for bugs. Or even tyops. Guess how thrilled I am when I spend about 25% of my bug fix time on completing German-style names? Anyway, I'm going back to lurking mode.
Code should be as easy to understand as possible, so that we can all contribute together. The biggest keys to that are consistency and conciseness. And in this situation, warn is clearly the best name along those lines.
An idea from Dscho:
"Continue the (good!) idea of ResultHandler, but simplify it first.
eg: Why does every method in ResultHandler repeat that it handles something?"
I see what he means:
void handleWarning(Warning warning);
could just be
void warning(Warning warning);
but maybe that's too little information as method names should be verbs...
so maybe this one is just a matter of taste...
processWarning
dealWithWarning
showWarning
useWarning
or maybe I miss the point...?
The text was updated successfully, but these errors were encountered: