Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70287 invoked from network); 22 Feb 2015 08:54:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2015 08:54:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=olemarkus@olemarkus.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=olemarkus@olemarkus.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain olemarkus.org from 178.79.164.89 cause and error) X-PHP-List-Original-Sender: olemarkus@olemarkus.org X-Host-Fingerprint: 178.79.164.89 olemarkus.org Received: from [178.79.164.89] ([178.79.164.89:56874] helo=sophia.olemarkus.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/51-08895-85999E45 for ; Sun, 22 Feb 2015 03:54:49 -0500 Received: from localhost (sophia.olemarkus.org [127.0.0.1]) by sophia.olemarkus.org (Postfix) with ESMTP id 9F8953603B; Sun, 22 Feb 2015 09:54:45 +0100 (CET) X-Virus-Scanned: amavisd-new at sophia.olemarkus.com Received: from sophia.olemarkus.org ([127.0.0.1]) by localhost (sophia.olemarkaus.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wEOegDygEoCI; Sun, 22 Feb 2015 09:54:38 +0100 (CET) Received: from [192.168.88.254] (221.212.251.212.customer.cdi.no [212.251.212.221]) by sophia.olemarkus.org (Postfix) with ESMTPSA id B6F2D36032; Sun, 22 Feb 2015 09:54:37 +0100 (CET) Message-ID: <54E9994C.6040600@olemarkus.org> Date: Sun, 22 Feb 2015 09:54:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWMgQnJhZHk=?= , Pierre Joye CC: Zeev Suraski , PHP internals References: <1504122f9eb01ea8d37c38d30e4b677d@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Coercive Scalar Type Hints From: olemarkus@olemarkus.org (Ole Markus With) On 02/21/2015 09:10 PM, Pádraic Brady wrote: > > On the RFC rules themselves, a few comments: > > 1. Happy to see leading/trailing spaces excluded. > 2. Rules don't make mention of leading zeroes, e.g. 0003 > 3. "1E07" might be construed as overly generous assuming we are > excluding stringy integers like hex, oct and binary > 4. I'm assuming the stringy ints are rejected? > 5. Is ".32" coerced to float or only "0.32"? Merely for clarification. > 6. Boolean coercion from other types... Not entirely sure myself. > Completely off the cuff: <=0: false, >0:true, floats and strings need > not apply. > 7. In string to float, only capital E or also small e? > 8. I'll never stop call them "stringy" ints. > In my mind, certainly a better proposition than those introducing dual mode. Agree with the comments above, except that I am entirely sure that boolean coercion from other types should not be allowed. Cheers, Ole Markus