Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74503 invoked from network); 29 Nov 2014 21:13:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2014 21:13:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=mailing@pascal-martin.fr; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mailing@pascal-martin.fr; sender-id=pass Received-SPF: pass (pb1.pair.com: domain pascal-martin.fr designates 176.31.99.170 as permitted sender) X-PHP-List-Original-Sender: mailing@pascal-martin.fr X-Host-Fingerprint: 176.31.99.170 ks391579.kimsufi.com Received: from [176.31.99.170] ([176.31.99.170:48041] helo=pascal-martin.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/91-62697-5E63A745 for ; Sat, 29 Nov 2014 16:13:09 -0500 Received: from [192.168.0.3] (home.squalenet.net [82.225.233.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pascal-martin.fr (Postfix) with ESMTPSA id 2E10740B2F for ; Sat, 29 Nov 2014 22:10:06 +0100 (CET) Message-ID: <547A36E1.4030906@pascal-martin.fr> Date: Sat, 29 Nov 2014 22:13:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [VOTE][RFC] Safe Casting Functions From: mailing@pascal-martin.fr ("Pascal Martin, AFUP") On 19/11/2014 21:39, Andrea Faulds wrote: > I am putting the Safe Casting Functions RFC to a vote. > > https://wiki.php.net/rfc/safe_cast#vote > > Voting starts today (2014-11-19) and ends in 10 days’ time (2014-11-29). Hi, Judging from the discussions we've had with other members of AFUP, I'm guessing we'd kind of be +0.5 to this. Having a proper definition of what is a valid int/float/string could prove useful, especially in a context of stronger typing (like scalar type-hints, which is one case this definition would be the most helpful). This definition would have to be considered as some kind of an *official* one, though -- and not just be used for a few functions. Staying within the context of this RFC, we'd probably prefer the try_*() version of those functions, which would be useful for validations -- even if throwing exceptions from regular non-OO functions is not quite (for now?) the PHP way. Not a full +1 though, mainly because these functions only feel like half-a-step towards stronger typing. -- Pascal MARTIN, AFUP - French UG http://php-internals.afup.org/