Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83097 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94983 invoked from network); 18 Feb 2015 17:50:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 17:50:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.220.53 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.53 mail-pa0-f53.google.com Received: from [209.85.220.53] ([209.85.220.53:32918] helo=mail-pa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/B0-25021-6D0D4E45 for ; Wed, 18 Feb 2015 12:50:14 -0500 Received: by pabkx10 with SMTP id kx10so2906933pab.0 for ; Wed, 18 Feb 2015 09:50:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=FCWdup8gI9NlOuBfF1m4HP7fvIOI8TA275nLs10d4CY=; b=HlnMEuoEVuTN7H5W/OCwfL2MH7Psoh7ww4QSnuA4qClOpPcOIoiOoBNk/Low947tfD mvL0Es0ybgvEOaTArgp06Kn0cedkGLqLqKGlBxyNX8jkRlywQ+zzcXOvON/cha9FvqeJ z068GsgLvpAf8mMuZe+qkOUBFEY5XLQRzCfgQL6jx2QUBd8BTDocdPsBEeV0v8Izw0Rc uvT92wdb0tZbuRWDaFrI0AyfAHkkbA8pv6fOsjikqok6It495KDdQvVip1Og3mDAZj40 f/+tZesfx1/fh1Zwe2kTagNr23156ewV8bJfJfl7vST0sExxZ511/ZSBseWoTq9cSxSy i0/g== X-Gm-Message-State: ALoCoQnN/Yczurrn2zudGDTPfJfRghqu5HPj4koTcNenVQOF8KsxmBSXs6LB++7aDqS5ivSoV+RG X-Received: by 10.70.133.168 with SMTP id pd8mr718167pdb.122.1424281811767; Wed, 18 Feb 2015 09:50:11 -0800 (PST) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id g10sm6493690pdo.26.2015.02.18.09.50.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 09:50:10 -0800 (PST) Message-ID: <54E4D0D0.10404@lerdorf.com> Date: Wed, 18 Feb 2015 09:50:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: francois@php.net, =?UTF-8?B?J1DDoWRyYWljIEJyYWR5Jw==?= CC: 'Robert Stoll' , 'Zeev Suraski' , 'Nikita Popov' , 'Sara Golemon' , 'PHP internals' References: <54E3E27B.2010903@lerdorf.com> <2f99c47df51fa6c73131032ec50fade0@mail.gmail.com> <005201d04b6c$1122d130$33687390$@tutteli.ch> <030f01d04b7f$0c71d1a0$255574e0$@php.net> <034e01d04b9b$2d7c0160$88740420$@php.net> In-Reply-To: <034e01d04b9b$2d7c0160$88740420$@php.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dHdIsOiv7CbMh66XAkHvVOObeoAkAx25C" Subject: Re: [PHP-DEV] Scalar Type Hints v0.4 From: rasmus@lerdorf.com (Rasmus Lerdorf) --dHdIsOiv7CbMh66XAkHvVOObeoAkAx25C Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/18/2015 08:51 AM, Fran=C3=A7ois Laupretre wrote: >> De : P=C3=A1draic Brady [mailto:padraic.brady@gmail.com] >> >> 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 offensiv= e. >=20 > I was just looking for a word for people who consider providing two mod= es is a pre-requisite to any discussion. >=20 >> I wouldn't necessarily mind int->float - it's lossless assuming one wa= y only. >=20 > It's lossless but it kills the 'strict' position. It can be claimed, on= e hand on the heart, this will be the only exception but, as use cases an= d side effects accumulate, we all know it will finish as a bunch of excep= tions to a no-more strict mode, adding confusion where it is not needed. = I guess the next one would be (int -> bool), and the rest would follow. 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. -Rasmus --dHdIsOiv7CbMh66XAkHvVOObeoAkAx25C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTk0NEACgkQlxayKTuqOuCNzwCfVhmyvaWiJTL3KN1j+yuVlJMl AEEAnA9bp1kMQoF+He7MoN43Sy5WWmTp =RA0C -----END PGP SIGNATURE----- --dHdIsOiv7CbMh66XAkHvVOObeoAkAx25C--