[Buildroot] [PATCH 01/13 v6] support/scripts: add helper to hardlink-or-copy

Yann E. MORIN yann.morin.1998 at free.fr
Sun May 8 07:25:27 UTC 2016


Arnout, All,

On 2016-05-07 20:44 +0200, Arnout Vandecappelle spake thusly:
> On 05/06/16 00:38, Yann E. MORIN wrote:
> >Arnout, All,
> >
> >On 2016-05-04 00:53 +0200, Arnout Vandecappelle spake thusly:
> >>On 04/29/16 00:27, Yann E. MORIN wrote:
> [snip]
> >>>+# hardlink-or-copy -- helper script to first try to hardlink,
> >>>+# and fallback to copy.
> >>>+HARDLINK_OR_COPY := support/scripts/hardlink-or-copy
> >>
> >> = instead of :=
> >>
> >>
> >> However (and here starts the difference of opinion in coding style): why do
> >>you need to define a variable for this? In general, I'm not a big fan of
> >>variables that just contain a constant string. For numbers, it makes sense,
> >>because a number is meaningless by itself. But a string is already something
> >>that is searchable and identifiable. And in this specific case, the variable
> >>name is even the same as the value... So what's the point? OK, you save 13
> >>characters in every place where you use it (that's in only 2 (TWO) places,
> >>by the way).
> >>
> >> We do have a few existing cases of such variables, but IMHO they are
> >>equally useless. And mostly introduced by you, BTW :-)
> >
> >Well, when the thing s used in multiple places, I find it "better" to
> >use a variable so as to be able to change all locations at once with a
> >single edit (even if we don't plan on renaming or moving it).
> 
>  I was going to build a big argument about why I disagree, but I see in v7
> you already dropped the variable so let's leave it at that :-)

Out of curiosity, what's your argument against having such a variable?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list