Re: [PATCH v2] CI: select CC based on CC_PACKAGE (again)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlo Arenas <carenas@xxxxxxxxx> writes:

> On Thu, Apr 21, 2022 at 12:12 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> Carlo Arenas <carenas@xxxxxxxxx> writes:
>>
>> >> -       CC="${CC:-gcc}"
>> >> +       CC="${CC_PACKAGE:-${CC:-gcc}}"
>> > ...
> Wondering if something more explicit might be easier to understand anyway like :
>
>   if test -n "$CC_PACKAGE"
>   then
>      CC="$CC_PACKAGE"
>   fi
>
> Carlo

The parameter substitution is commonly used part of the shell
language, and even if developers, when starting to work on parts of
the system that are written in shell, are initially unfamiliar with
such language constructs, nobody will stay a newbie forever.  

To them, idioms like ${A:-${B:-C}} would quickly become as explicit
as a long-form written as if/then/elif/fi.  Surely it takes practice
to be familiar with the idiom, but idioms help those who know them
to be more efficient and effetive, so, no, I do not think it is a
good idea to aim for "easier to understand by newbies".

Thanks.







[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux