News for hackers. Stuff that matters.
Re:Exceptional Naming by crubier on Sunday June 27, 2021 @12:17PM (#27652789)
I don’t like your technique because:

1- As you say yourself, there is some amount of subjectivity about when « handleX » is the best description (when the effect is extensive enough) and when it is not.

2- The whole point of calling handlers « handleX » is that you DO get to know what happens when the event X happen: you just have to read the content of « handleX » function.

So here is my solution: follow conventions. If your handler is a simple thing like « setServer » you’ll see that the function content is one line of code. If it’s more complex, you will see it also.

It works 100% of the time, ensures that people won’t loose their mind reading your code, and prevent useless debates about form.

Re:Exceptional Naming by ahartmetz on Sunday June 27, 2021 @08:34PM (#27656846)
The idea of signals and slots is a loose, flexible coupling, so I think that the connect() is the perfect place to read about what causes what. It seems like your expectations come from something like virtual interfaces (in the C++ sense) - these often have a limited amount of implementations on both sides that "know" each other more closely.