[Rpm-ecosystem] Triple operator for conditional shortcut - choosing the best notation
Igor Gnatenko
ignatenkobrain at fedoraproject.org
Sun Dec 30 19:24:07 UTC 2018
On Sun, Dec 30, 2018 at 11: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?
I would like to avoid more curly braces, so I personally like last
option. Though the first option is not bad too.
Second option is too complicated.
> For more details see. https://github.com/rpm-software-management/rpm/issues/115.
>
> Pavlina Moravcova Varekova
> _______________________________________________
> Rpm-ecosystem mailing list
> Rpm-ecosystem at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem
More information about the Rpm-ecosystem
mailing list