On Mon, 24 Feb 2020 at 14:35, Mitch Curtis <mitch.cur...@qt.io> wrote:
> > > > > Signals have different semantics than regular functions.
> > > >
> > > > In what way?
> > >
> > > They typically call back into "upper layers", which is worth considering 
> > > on
> > the calling side, e.g. due to the danger of inconsistent state getting 
> > accessed
> > if you don't emit the signal at the end of a function, to name just one 
> > tyical
> > pitfall.
> > > 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.
> >
> > A signal emitted yields to a coroutine scheduler that runs arbitrary 
> > callbacks,
> > which in case of direct connections absolutely can affect the current scope.
> >
> > Thanks, Christian - that's the first ever plausible explanation for marking 
> > a
> > signal emission.
>
> Personally I find it a bit concerning that you don't consider readability or 
> maintainability a plausible explanation for annotating code with emit.

I find it rather more concerning that you make such a claim, when in
the quoted bit I do consider readability and maintainability
such plausible explanations. Perhaps that's because I don't consider
vague claims of readability and maintainability plausible,
but I do consider readability and maintainability with an actual
reason plausible, and
typically-calling-up-into-arbitrary-code-that-can-and-does-call-back-to-us
is such a reason.

>Though I can rest easy with the knowledge that you're not the sole authority 
>for what constitutes a plausible explanation, despite how you worded it.

Well, for what constitutes a plausible explanation to me, I actually
am the sole authority.

> I can only assume that that same mindset must also encapsulate all of the 
> developers who never wrote any comments for their code because... it made 
> sense to them and that's all matters.

Did you plan to set that strawman on fire, or are you just playing with it?
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to