Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83459 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61703 invoked from network); 22 Feb 2015 06:17:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2015 06:17:18 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.212.171 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.212.171 mail-wi0-f171.google.com Received: from [209.85.212.171] ([209.85.212.171:58446] helo=mail-wi0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/70-08895-D6479E45 for ; Sun, 22 Feb 2015 01:17:18 -0500 Received: by mail-wi0-f171.google.com with SMTP id hi2so10574964wib.4 for ; Sat, 21 Feb 2015 22:17:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=S/bXc6Y7+BgacOCK9lVNlcTliUI5pwp6Ap4BLaw24xM=; b=D7WC/tUVswZ1dyo40roj8/0Bc8zX4seqA7gnU025GGCQBrBJ0NdhEet44K4EFStb1q f34ifCRfUcRi4/shJ31VDJ086xVRGG5DWLLQrRmWTGGigSxJnsvwqOfF4O7kMwZxihAS BzcYc2u8p7fjxrMmedQd7mQvmcyMEvyVkOkSrGNCSyjl7vgEixWGMVmJZrv0MV69hnTw tDrk34NJ0l47JE3G+oHo27jZCcn0/1T4Q9HbSI5lgoQhrUKtuQxR7rFXLMe/10lJWXyf d7FhsLVf0sccqkspO0YhqsZfC1lWQt4AiYzqHcvz6eq/QfLFdhy8VoSAUxJ5KJewNr9A OOFg== X-Gm-Message-State: ALoCoQmMITz3cXrMz/JTlX956abgapO/r+qXZC9WwSQ5kdAh3agvGmQCsmwyRY2KqCXao5e2Z9Z8qRA0zL+O/Zt7+asnysRRs0N30cjw5hEHHvT+Z8F7yPg+m5EGloG1Q43zWSix+a6ng0cr5uDbzVzJgCJNCrbi8w== X-Received: by 10.194.63.16 with SMTP id c16mr10384667wjs.117.1424585833113; Sat, 21 Feb 2015 22:17:13 -0800 (PST) Received: from [192.168.0.6] ([77.127.197.178]) by mx.google.com with ESMTPSA id bd3sm2377093wib.17.2015.02.21.22.17.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Feb 2015 22:17:11 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) X-Mailer: iPad Mail (12B466) In-Reply-To: <066d01d04e33$82dca020$8895e060$@php.net> Date: Sun, 22 Feb 2015 08:17:11 +0200 Cc: Lester Caine , "" Content-Transfer-Encoding: quoted-printable Message-ID: <2B5A967C-B574-43D4-B7EB-D9D8BB272E11@zend.com> References: <7ef509ef10bb345c792f9d259c7a3fbb@mail.gmail.com> <54E91123.9010508@lsces.co.uk> <066d01d04e33$82dca020$8895e060$@php.net> To: "" Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC From: zeev@zend.com (Zeev Suraski) On 22 =D7=91=D7=A4=D7=91=D7=A8=D7=B3 2015, at 02:07, Fran=C3=A7ois Laupretre= wrote: >> De : Lester Caine [mailto:lester@lsces.co.uk] >>=20 >> Fixed length fields may well be a data source so having to strip them >> before using them just seems a backward step. The basic C library simply >> strips the white space so are we looking at using an alternative? >=20 > I guess you got it wrong : we'll ignore leading and trailing blanks, as we= ll as leading 0s. We say we restrict because, where we accepted *every* trai= ling chars, we now only accept blanks. So fixed length fields will work as b= efore. Actually the Coercive STH RFC currently takes the position that leading or t= railing spaces will not be accepted. In general, the idea is to support the conversions which are likely to be ri= ght and safe in the vast majority of cases, and if there's any doubt - rejec= t it. It's of course up for discussion, but it's that concept that I believ= e can bridge the gap between proponents of strict and proponents of dynamic t= yping. Thanks, Zeev=