Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83175 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96524 invoked from network); 19 Feb 2015 12:47:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 12:47:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:17976] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/B1-18870-A4BD5E45 for ; Thu, 19 Feb 2015 07:47:07 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id D93DE4B029F; Thu, 19 Feb 2015 13:46:41 +0100 (CET) Reply-To: To: "'Lester Caine'" , References: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <022801d04ab1$4a0c47d0$de24d770$@php.net> <1913e09d7f52541901d8574d2080a63f@mail.gmail.com> <7a5d96b34b98ec1f3ee17be7fa6a1e81@mail.gmail.com> <2CBDEB67-3DE3-437D-9AF3-0E6A92027244@zend.com> <4cc0c81c7199a452534bb8edcdb19914@mail.gmail.com> <54E589F6.9030002@garfieldtech.com> <54E5B9DD.6080607@lsces.co.uk> In-Reply-To: <54E5B9DD.6080607@lsces.co.uk> Date: Thu, 19 Feb 2015 13:47:00 +0100 Message-ID: <044201d04c42$277a8dc0$766fa940$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGD0sLDaA+/0NIeBlQhQC5OtPA/xwHih9+6AanvcsEBj7eMCwEU0CpMAs0H7+gBDwGZjwJNu28fAX8sxVQAox2RWwKtsa6+Ap7Ai84CNkZj6gJ0jMndAd8n3MgBp3GfaAJFqx85nJ7WrFA= Content-Language: fr X-Antivirus: avast! (VPS 150219-0, 19/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Reviving scalar type hints From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) Hi Lester, I didn't add restrictions specific to number representation in the draft = ruleset yet, becausen while I think that's an important point, I didn't = have time to study it in depth. I know you're an expert on this as you continuously (rightly) raised the = point. So, can you elaborate on this and send me or, better, publish on the = list the detailed set of changes you suggest, including 32 bit vs 64 bit = concerns if they fit. Today, conversion restrictions are rather limited = as floats which don't fit in int give 0, and int to float is considered = as always possible. I mean that must be technically incorrect, while = unnoticed in the vast majority of cases. So can you write a consistent set of changes you would introduce ? Thanks Fran=C3=A7ois > -----Message d'origine----- > De : Lester Caine [mailto:lester@lsces.co.uk] > Envoy=C3=A9 : jeudi 19 f=C3=A9vrier 2015 11:24 > =C3=80 : internals@lists.php.net > Objet : Re: [PHP-DEV] Reviving scalar type hints >=20 > On 19/02/15 09:13, Zeev Suraski wrote: > > Obviously, I think 'weak' campers have a lot to gain too - by making > > sensible conversions work fine as expected, without having to resort = to > > explicit casts. > > And everyone stands to gain from having just one mode, instead of = two. > > The coercive typing approach would require each camp to give up a = bit of > > their 'ideology', but it also gives both schools of thought *most* = of what > > they want, including the key tenets for each camp (rejecting = non-sensible > > conversions - always, allowing sensible ones - always). I believe = that's > > what makes it a good compromise, a better one than the currently > proposed > > RFC. >=20 > Now that all made sense! >=20 > My only grey area is 'allowing sensible ones' where the size is an > integral part of what is 'sensible' ... the one where conventional > strict typing uses a type of the right size? >=20 > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=3Dcontact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php