From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp684.redcondor.net (smtp684.redcondor.net [208.80.206.84]) by mail.openembedded.org (Postfix) with ESMTP id 2439B73174 for ; Wed, 17 Aug 2016 13:21:32 +0000 (UTC) Received: from astoria.ccjclearline.com ([64.235.106.9]) by smtp684.redcondor.net ({700db0a8-6fb7-4c8b-9b2a-6812225182d8}) via TCP (outbound) with ESMTPS id 20160817132130565_0684; Wed, 17 Aug 2016 13:21:30 +0000 X-RC-FROM: Received: from [216.191.234.70] (port=23128 helo=crashcourse.ca) by astoria.ccjclearline.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1ba0oU-0005QU-MG; Wed, 17 Aug 2016 09:23:22 -0400 Date: Wed, 17 Aug 2016 09:21:15 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@ca624034.mitel.com To: Khem Raj In-Reply-To: <92B4EF25-FE41-4310-B78A-554EA37BF507@gmail.com> Message-ID: References: <92B4EF25-FE41-4310-B78A-554EA37BF507@gmail.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-MAG-OUTBOUND: ccj.redcondor.net@64.235.106.9/32 Cc: OE Core mailing list Subject: Re: subtle weirdness when you combine "_append" with "+="? X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 13:21:33 -0000 Content-Type: text/plain; charset=US-ASCII On Tue, 16 Aug 2016, Khem Raj wrote: ... big snip ... > the _append/_prepend in conjunction with += is a undocumented > behavior however, I do not see it as much a side effect. But in > future bitbake may silently change its behavior, so I agree its > always good to stay in safe waters. so just to finalize this discussion, my thoughts on a reasonable and meaningful standard for append/prepend/etc/etc would be to *always* use the "mathematical" operators +=/.=/=+/=. except in two situations: 1) when parsing *must* be delayed until the end, or 2) when combining the operation with an override (for which i'm quite sure there is no equivalent when using +=, etc, right?) i'm a big fan of simplicity, in the sense that, if an append operation does not *require* "_append", it shouldn't use it. because if i see an expression: VAR_append = "..." then i immediately wonder if there is a *reason* for using "_append" rather than "+=" or ".=", or if that is just the developer's personal preference. and i really, really, really hate having to guess. oh, and of course, never, ever combine "_append" with "+=" or ".=". does that sound like a reasonable coding style? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================