Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97992 invoked from network); 18 Feb 2015 17:55:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 17:55:52 -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.172 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:44730] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/51-25021-622D4E45 for ; Wed, 18 Feb 2015 12:55:52 -0500 Received: by mail-wi0-f172.google.com with SMTP id l15so42754618wiw.5 for ; Wed, 18 Feb 2015 09:55:47 -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=PoED6pLHKm5ZMUxZzvVFPwTSWEE4xNCBI0l99M7skQY=; b=NcGLxefMQPNOsgo9/C3TYsSFn/SGwHfJPQqbANIcBbxEoBv8u+hLcuNONDicR4PGIF 27CDf4m590QlxD9m1nLg79245+7s4pYt6wLpoBTuyCqPJCyT6HyVHGGQD7O10KQd3HWp c5rXSiKIQledbCD/7zNvkDUcCdgyxG7EskkiTHNi62Y/VOJbxfjppfOl33guuCab4hA9 UAtDv1jBbyBS7uslhuzL2pErMlSQaDRNPOzXXDEqYdJxzt4LvUFQbBlyJcdzwNZ+ti2j A3NyaRy3UE9+eKxt5ilGGikyv84A4PkwP1CMeUHPpTwzE5b9GlTKdFziqxEV9ZvNPA/6 HGPw== X-Gm-Message-State: ALoCoQlOTnIB1js9vnEyAyrZR2jsNakhCrTRRBITMTP2hvpMr6FkyY/6OOQk5IsJlxHhj7ipSpiN0p6ntyp4gg7WxBCgIoG8KBLMM5Gv3IOfc4NArtXN1U03v0Eg0fMGXozCfNTNOzRzbf7QRVvRgNwMBEllfXmY8A== X-Received: by 10.180.205.210 with SMTP id li18mr7227143wic.39.1424282147544; Wed, 18 Feb 2015 09:55:47 -0800 (PST) Received: from [192.168.0.119] ([77.127.197.178]) by mx.google.com with ESMTPSA id x6sm33671099wjf.24.2015.02.18.09.55.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Feb 2015 09:55:46 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (12B466) In-Reply-To: <54E4D0D0.10404@lerdorf.com> Date: Wed, 18 Feb 2015 19:55:43 +0200 Cc: "francois@php.net" , =?utf-8?Q?P=C3=A1draic_Brady?= , Robert Stoll , Nikita Popov , Sara Golemon , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <7766B1DB-439B-4AEB-9CF0-1D2C5E7937D1@zend.com> References: <54E3E27B.2010903@lerdorf.com> <2f99c47df51fa6c73131032ec50fade0@mail.gmail.com> <005201d04b6c$1122d130$33687390$@tutteli.ch> <030f01d04b7f$0c71d1a0$255574e0$@php.net> <034e01d04b9b$2d7c0160$88740420$@php.net> <54E4D0D0.10404@lerdorf.com> To: Rasmus Lerdorf Subject: Re: [PHP-DEV] Scalar Type Hints v0.4 From: zeev@zend.com (Zeev Suraski) > On 18 =D7=91=D7=A4=D7=91=D7=A8=D7=B3 2015, at 19:50, Rasmus Lerdorf wrote: >=20 > On 02/18/2015 08:51 AM, Fran=C3=A7ois Laupretre wrote: >>> De : P=C3=A1draic Brady [mailto:padraic.brady@gmail.com] >>>=20 >>> Careful, it helps not to call folk "radicals" if you intend to pursue >>> a compromise with them ;). >>=20 >> Sorry, english is not my native language, and 'radical' may be offensive.= >>=20 >> I was just looking for a word for people who consider providing two modes= is a pre-requisite to any discussion. >>=20 >>> I wouldn't necessarily mind int->float - it's lossless assuming one way o= nly. >>=20 >> It's lossless but it kills the 'strict' position. It can be claimed, one h= and on the heart, this will be the only exception but, as use cases and side= effects accumulate, we all know it will finish as a bunch of exceptions to a= no-more strict mode, adding confusion where it is not needed. I guess the n= ext one would be (int -> bool), and the rest would follow. >=20 > We need to keep in mind that int->float isn't technically lossless. We > have a 53-bit IEEE754 mantissa to take account for here, so it is only > lossless for values below 36028797018963966 or so. We can limit ourselves to values below that limit. If you deal with values a= bove it, be explicit about casting. Zeev=