[Development] A modest proposal: disable lower-case keywords (emit, foreach, forever, signals, slots) by default

André Pönitz apoenitz at t-online.de
Fri Feb 21 21:17:07 CET 2020


On Fri, Feb 21, 2020 at 04:02:04PM +0200, Ville Voutilainen wrote:
> > I, for one, definitely want to see whether I am emitting a signal or not.
> 
> Right; the claims that you can ignore signal emits when looking at a
> piece of code or expect that they
> don't affect the current scope are exactly backwards.

Christian is right and your conclusion is wrong.

See the already mentioned example of debugging in code that follows
the convention of using signals only for inside-out communication:

Emitting the signal may cause all kind of activity on the outside,
but in first approximation one can assume it doesn't change state in
the current object. So when drilling down in this situation
"ignoring" emit is indeed natural.

That's a different situation than, say, just reading code, where an
emit is a flag that assumptions on the calling code might not be
valid anymore.

> [...]
> Thanks, Christian - that's the first ever plausible explanation for
> marking a signal emission.

This sounds a bit like the committee shot down the proposal to
not use 'emit' without even bothering to think about reasons why
there are users of this "nonsense", let alone tried to ask them.

Andre'

PS: @Marc: Thank you for trying.


More information about the Development mailing list