[Rpm-ecosystem] Triple operator for conditional shortcut - choosing the best notation
Neal Gompa
ngompa13 at gmail.com
Sat Jan 5 12:41:50 UTC 2019
On Sun, Dec 30, 2018 at 5:57 AM Pavlina Moravcova Varekova
<pmoravco at redhat.com> wrote:
>
> Hi,
> I plan to implement "Triple operator for conditional shortcut".
> (https://github.com/rpm-software-management/rpm/issues/115.)
> There are several possibilities that can be used:
>
> %{?{condition}:true:false} and %{!?{condition}:false:true}
>
> or
>
> %{?{condition}?true:false} and %{!?{condition}?false:true}
>
> or
>
> %{?:condition:true:false} and %{?!:condition:false:true}
>
> From the implementation point of view they are quite similar, so please does any of the notations look appropriate for you? Which of them do you prefer?
>
> For more details see. https://github.com/rpm-software-management/rpm/issues/115.
>
The first option makes sense to me, since it trivially expands the
existing conditional shortcut form %{?condition:true} /
%{!?condition:false}.
--
真実はいつも一つ!/ Always, there's only one truth!
More information about the Rpm-ecosystem
mailing list