[Development] A modest proposal: disable lower-case keywords (emit, foreach, forever, signals, slots) by default
Matthew Woehlke
mwoehlke.floss at gmail.com
Thu Feb 27 21:51:18 CET 2020
On 26/02/2020 07.42, Tor Arne Vestbø wrote:
> As others have argued, a signal is not special, in the sense that any function can do anything, including emitting signals, so annotating it doesn’t seem critical, as we apparently are fine without in all other cases.
Taking a step back... I think some of the reason for the current
situation has to do with API design. Which of these is easier to understand?
if (map.empty())
emptied();
- vs. -
if (map.isEmpty())
emit emptied();
One reads like plain English. The other is missing words in a way that
can confuse readers.
--
Matthew
More information about the Development
mailing list