On Sun, 2021-08-01 at 16:40 +0200, Ulrich Mueller wrote:
> > > > > > On Sun, 01 Aug 2021, Michał Górny wrote:
>
> > > + 3.0) [[ ${EAPI} == 7 ]] \
> > > + || die "GTK 2 no longer supported
> > > in EAPI ${EAPI}" ;;
>
> > Let's make it:
>
> > [[ ${EAPI} != 7 ]] && die ...
>
> > to keep the logic more straightforward (and consistent with 'if ...;
> > then').
>
> Generally, I like the "<successful statement> || die" style more,
> because it is more common. It is also more consistent about the return
> status of the whole expression. With the && operator above, it would
> return shell false in case of success.
A user requested the other style in one of my earlier patches,
and I kinda agree that this reverse logic can easily get confusing.
> Of course, there's no functional difference here, but if you have it
> at
> the end of a function or before an explicit return statement it may
> play
> a role.
...only if it's nonfatal-friendly.
--
Best regards,
Michał Górny