On Mon, Oct 05, 2020 at 12:54:18PM +0200, Pavel Sanda wrote:
> On Mon, Oct 05, 2020 at 01:48:20PM +0300, Yuriy Skalko wrote:
> > > Ok, probably question of habit. When I see former three lines like above 
> > > I 
> > > immediately
> > > know what's going on. With new changes and I need to stop and start 
> > > thinking 
> > > what it does...
> > > 
> > > Pavel
> > 
> > Just look at the return expression as the answer to the question in
> > function name:
> 
> No worries I can decode it, it's just that the previous pattern is already
> unconsciously hardwired in my brain, so I can process it faster ;)
> As other(s) seem to be ok with the change I am not going to fight it.

Same here. I also do not object to the patch, but my brain did take a
bit longer to parse the new version. For some reason my brain expects
"return" statements to be easy to parse so it gets upset when it has to
work for those. In contrast, it has no problem expecting that if
conditions can be non-trivial.

After thinking about it more though, I agree that the new version seems
to be better in terms of having only one return, although it's
interesting that some minor complexity (e.g., the cast or the explicit
comparison to nullptr) has to be added to achieve this in some cases.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to