[OE-core] is there an actual defensible usage for combining "_append" and "+="?
Robert P. J. Day
rpjday at crashcourse.ca
Fri May 27 10:31:42 UTC 2016
On Thu, 26 May 2016, Khem Raj wrote:
> On Thu, May 26, 2016 at 11:56 AM, Robert P. J. Day
> <rpjday at crashcourse.ca> wrote:
> >
> > i've grumbled about this before -- the *apparent* redundancy in
> > combining the "_append" and "+=" constructs -- but someone recently
> > suggested there's a use case for that that weirds me out if true.
> >
> > given that "_append" defers appending, and that "+=" inserts a
> > space, the argument was that combining them both defers appending
> > *and* inserts a space when appending is finally done.
> >
> > *blink*.
> >
> > seriously? is that what that combination is being used for?
>
> I am not sure if its used consciously most of time, I ask developers
> why they used it they just wanted to add to an existing variable and
> += did not work.
>
> the construct is an unintended side effect of bitbake syntax
but the question remains, are people using that weird combination
*deliberately*, if it in fact gives you the combination of the two
effects? as in, are people writing:
VAR_append += "string"
when it would be equivalent to write
VAR_append = " string"
simply because they're too lazy to add the leading space?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list