Gentoo Archives: gentoo-dev

From: "Paweł Hajdan
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] use_echo() as a universal '?:' operator-like function
Date: Thu, 09 Sep 2010 03:15:40
Message-Id: 4C8844B5.5050402@gentoo.org
In Reply to: [gentoo-dev] use_echo() as a universal '?:' operator-like function by "Michał Górny"
1 On 9/8/10 12:03 PM, Michał Górny wrote:
2 > We already have a variety of use_*() functions with their specific
3 > uses. But what I miss is a single, simple and universal use_echo()
4 > function, behaving similarly to ?: operator in C. In other words, a
5 > simple function replacing monsters like:
6 > $(use foo && echo bar || echo baz)
7
8 I'm not sure about the name use_echo, but some form of ternary operator
9 other than "&& ||" (which is very hard to read for me and just error
10 prone) would be very useful.
11
12 Paweł

Attachments

File name MIME type
signature.asc application/pgp-signature