From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28507 invoked by alias); 1 Oct 2014 15:03:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33306 Received: (qmail 10764 invoked from network); 1 Oct 2014 15:03:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1412175422; bh=4qrxn+uUZjQ/zfjpvKeVML4ZpeMIcVmwBvfPSxLY0Eg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=0CK7DsM/2wrfDIsyD/x47jY9VGrlGFdFyQEcbeFdDBrJ53pTzp2+B9BBxxIq0yIDtARuwOD3C3aq/x80gF6SiMd9x5X0XJdd0BoWvgUu1K2HhOem70pG5iYW3bnyDij7U/VwJ4j7OuNuteIuOnks9FtLoFSrCQjT8WsMUopEyqs= X-Yahoo-Newman-Id: 220551.75255.bm@smtp136.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _KK4m4UVM1lbsXb.2Mxsf.C1DktbOPIROeGs5nRPfqjKqAG 3shZDK.VgEEdy_LgEqF.z.a354v0EIvdWFyX0fODYRp8dzAB0uTTcFHY6aqg 2p6kt2.BJAauKTAWomiaGL64j7JFWvS_TqQ5gPWR4BKkJzMdfnTduKwxFw8K 1MbVZTsxsN4U4x6iaE0NO1fW4T7Nl4nkThWM2HvQIzc9lQUPIAJV8KHPNFTT hhD8HUVAFHpsQNSOBgirWlrWM7.7ByJSr_ZiGbY83_XMQ.TO0kcUVFUxK.oM kB.b1O_5348Ri7S7rpIxBmCPLf6GhYg0JyrrIhD2sO2_bMtI0IvVQLrXreEQ E7apXC5KXIZyAITJmpwwcDLQ7JlrcxKsUYnlc0jgOOBrI9h_77wPonfjdGdq exJRy6ayfWmIHPmr5hoBQlPQZqMXbmJnY.XeC41GOhGxirsWuuufVSA3casP rC..m950LTsiTw_rSuFf4Wy3tVSZygIzZmQUl675QCpqNBTvpnc4T8xh8tBt KOqcS3W..jYNuT9B5NirAoMhS6gM- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20140929110420.52cc66f8@pwslap01u.europe.root.pri> From: Oliver Kiddle References: <20140925141133.49a7127b@pwslap01u.europe.root.pri> <22772.1411740194@thecus.kiddle.eu> <20140926210818.3ac1bf20@pws-pc.ntlworld.com> <20140929110420.52cc66f8@pwslap01u.europe.root.pri> To: Zsh Hackers' List Subject: Re: [Bulk] PATCH: safe numeric import MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28167.1412175420.1@thecus.kiddle.eu> Date: Wed, 01 Oct 2014 16:57:01 +0200 Message-ID: <28168.1412175421@thecus.kiddle.eu> Peter Stephenson wrote: > OK, how about this? When we're doing the import, all numbers, integer > or floating point, are imported straight, without an evaluation. > Sticking numbers into the environment to be evaluated later doesn't > make a lot of sense. This looks like a good approach. > Currently we suppress all errors from parameters at this stage, though > we could make a special case and output errors when we truncate a > numeric import because we ignored anything after an initial constant. I think it's better not to have error messages because of anything in the environment. Just sanitise as we see fit and then get on with things. By the way, the example I had for readonlys such as status is wrong: error's from the outer shell - I should have used env. For functions, the error occurs later in module.c when it tries to add the normal functions parameter so is harder to avoid. Oliver