From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 77F001384B4 for ; Sat, 2 Jan 2016 13:37:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C186021C060; Sat, 2 Jan 2016 13:36:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1962DE0886 for ; Sat, 2 Jan 2016 13:36:38 +0000 (UTC) Received: from [172.20.50.80] (rrcs-74-219-5-163.midsouth.biz.rr.com [74.219.5.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id D73EF33D3CE for ; Sat, 2 Jan 2016 13:36:37 +0000 (UTC) Subject: Re: [gentoo-dev] Re: [PATCH 01/15] scons-utils.eclass: Modernize the example not to rely on myescons... To: gentoo-dev@lists.gentoo.org References: <1451666481-22145-1-git-send-email-mgorny@gentoo.org> <1451666481-22145-2-git-send-email-mgorny@gentoo.org> <20160101181525.4aee6ea0.mgorny@gentoo.org> From: Michael Orlitzky X-Enigmail-Draft-Status: N1110 Message-ID: <5687D2BE.3030100@gentoo.org> Date: Sat, 2 Jan 2016 08:38:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 88d6ddbe-2710-4276-a31c-5ad82f10cacb X-Archives-Hash: f7bb443deb3027c3e6ee18abde952912 On 01/01/2016 12:42 PM, Michael Palimaka wrote: > I don't see the absurdity. Two formally independent statements that are actually dependent because of some implicit shared state: >> >> src_configure() { >> local mycmakeargs=( >> ... >> ) >> cmake-utils_src_configure >> } >> In this example it's clear that the behavior of ecmake depends on the value of $myconf: >> >> src_configure() { >> local myconf=( >> ... >> ) >> ecmake "${myconf[@]}" >> } >> The latter is a lot more peaceful to maintain. I can hop right into the code and see that changing $myconf is going to have some effect on the ecmake line. In the first example, I could change $mycmakeargs 100 lines away for some unrelated issue. The only way for me to know that it would effect the cmake-utils_src_configure line is to read the source of that function proactively (or after it breaks).