From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BAD4C433EF for ; Thu, 21 Oct 2021 09:02:53 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E27260E9C for ; Thu, 21 Oct 2021 09:02:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8E27260E9C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D96583423; Thu, 21 Oct 2021 11:02:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634806970; bh=iYm1bjeQ/phQhLbnItH9wLcMZY5DerjYtMOOqnrHbKs=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EKMebuTJzUCyUg6VDpJZroJ6IoX2tQmoQLDPauOQD1l2tPqAGloJ7ZF2ZlScUpZsU GBTMSZGCx7S8ADxOjzH5HPSl00vs7vIsrDtXBqKs4F9eZrFQi5Z9zce4/PYzVREak0 J8eaxfNdMHpMz/DT7H2CFINVplSpuObU8I6q+v8IMbE+vzMWvMyE/1GwlxsW1R0gCO GLFD777IsN4R5LSdSLV/tvRZvQJh1aRdU5FST+wDJ8LUS+ZAE+99rfVP4BGFwe06Lh HBBcT3ah6LISlAMBc+/ZF1X1e+SsEDvrL3GKcTgI01CfX3SrsdI3Cv1HRHTQ+yL6e7 lCgQE42A7gmtg== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 415B083374 for ; Thu, 21 Oct 2021 11:02:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634806968; bh=iYm1bjeQ/phQhLbnItH9wLcMZY5DerjYtMOOqnrHbKs=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=UYNvkhQKp+vbJIQNfO5QsQj9UiHUkuJzNN2zmipQsn3swBas49n7hmq5ccACSv85d jCYfWeXPuzlqc4EGeK51KPGSR3i4IIfCCsPa2MEksnyEDXy4E24MrvzsCVvRqk+HU9 QUNhNGyjeDk1Lh+soI25pqI0BerR7iMjsaBr2YhIXrAxXsk3vgtny9XwbwqQb2PbAf /bdaqEv9jvecTvhufsnXOEiVqQXOrTOt27B3VQG72ZhmpO291tuZ9faN59X4q4YV17 m5xpsMuh0NG2xaGnyoU8Ipfln7+5WRGYOhaR6aRna1aiV05Gl1DekO2HwfyFqCMSLQ 3keFMjjoL0MKA== Received: by janitor.denx.de (Postfix, from userid 108) id E3E0AA021F; Thu, 21 Oct 2021 11:02:47 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id 05003A0099; Thu, 21 Oct 2021 11:02:40 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id A01071E0F1B; Thu, 21 Oct 2021 11:02:40 +0200 (CEST) To: Simon Glass cc: Tom Rini , U-Boot Mailing List , Rasmus Villemoes , Heinrich Schuchardt , Joe Hershberger From: Wolfgang Denk Subject: Re: [PATCH v8 4/8] env: Allow U-Boot scripts to be placed in a .env file MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: References: <20211018181322.1181847-1-sjg@chromium.org> <20211018121315.v8.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> <20211019140711.GC7964@bill-the-cat> <20211019142529.GE7964@bill-the-cat> <3573814.1634660430@gemini.denx.de> Comments: In-reply-to Simon Glass message dated "Tue, 19 Oct 2021 10:24:25 -0600." Date: Thu, 21 Oct 2021 11:02:40 +0200 Message-ID: <3677590.1634806960@gemini.denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Dear Simon, In message you wrote: > > > > var++=fred > > > > > > is unambiguous but very confusing. I think it would be better to disallow + > > > > It's neither unambiguous nor confusing. It is assigning to "var++". > > What? Can you read that again? Did so, but didn't get what you might mean? In the "" syntax there is no way to define an operator that starts with a character that is legal at the end o a name. Especially since usual escape characters like backslash are also valid characters in a name. So if you want to maintain the status quo for variable names, you must use an operator that has no such needs. > > It is much easier to change what is new and can be defined at will. i. e. define an operator that is stil trivial to parse (as in an awk script) and does not clash with name rules. > > If we define for example that "=+" appends, then we can > > also define our own escape rules, for example: > > > > var=fred assigns > > var=+fred appends "fred" > > var=\+fred assignes the value "+fred" > > var=++fred appends "+fred" > > I don't like that at all. Why not? Yes, "=+" may be less intuitive than "+=", but then, it's a new feature, it is esy to use, and it does not clash with any potentially existing environments. > It requires an escape for a common case and Well, I think if appending a value that starts with a '+' charecter is a "common case", then variable names ending ith a '+' are common case, too. And at least my proposal can handle all situations I can think of in a somewhat reasonable way, and it does not need to place new restrictions on variable names. > is very confusing. Is it? > Since people will be converting their out-of-tree scripts anyway, they > can check for this sort of madness at the time. There should be no > problem. Agreed. There should be no problem with my proposal - the last 2 of the 4 example aboves are pathological situations which will not happen often. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Microsoft Compatibility: your old Windows 3.11 application crash exactly as the new ones.