Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99840 invoked from network); 19 Feb 2015 12:52:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 12:52:15 -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.223.170 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.223.170 mail-ie0-f170.google.com Received: from [209.85.223.170] ([209.85.223.170:39301] helo=mail-ie0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/62-18870-D7CD5E45 for ; Thu, 19 Feb 2015 07:52:14 -0500 Received: by iecvy18 with SMTP id vy18so9086607iec.6 for ; Thu, 19 Feb 2015 04:52: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:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=0vj3Oat6ofaAr1euz8NRUezps48fRV4xssR6bYVLiUo=; b=Ys2SXTzRLMpvR4+QRdqYtbP+GQy9PtR9so5Y/sDy5GZXwT98KCRIARhUZAqc/0GENY yqmLHV/LaqCXazFz/lV/cLM9SwvBLFmNkYOToRatNp5qnsTcl4+uO5OPI49D4XdgvjDI ErMlWkQpr5BLr5Rk638VQL5x+HgcDuvhigC2tIyYOqXfaNG3egFbx4Ryqsd5THTVXCsG uSsbnpvVQt1W1YB+7T8rRoejaoRo7ea1jFjsceuMe93XnUJUpfO9g3OlNpZLPVMcdN4Q zD9VfJdwrIT5yJR8fhJLKyEQ7Av6xOlvOpPCnkivFP2a3BxSgXoaXazhutOBNW0AVZKI RQzw== X-Gm-Message-State: ALoCoQlr020aWzdcRVj+OKd+2ZVvXPRMMuAMkuOMxAP1hVwRE3sSSFgsu9TqOI8KgdJGEHhTyvjtCtm16BplbitUNj2DAfS8kj5CdBPnis5YD2xcTM7/N80muzxYfdAOns0BteX39Z6qLMYy9SQK+uTg5WEBytVHGA== X-Received: by 10.107.137.17 with SMTP id l17mr5633442iod.33.1424350331217; Thu, 19 Feb 2015 04:52:11 -0800 (PST) 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> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGD0sLDaA+/0NIeBlQhQC5OtPA/xwHih9+6AanvcsEBj7eMCwEU0CpMAs0H7+gBDwGZjwJNu28fAX8sxVQAox2RWwKtsa6+Ap7Ai84CNkZj6gJ0jMndAd8n3MgBp3GfaAJFqx85nJ7a0UA= Date: Thu, 19 Feb 2015 14:52:10 +0200 Message-ID: To: Lester Caine Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] Reviving scalar type hints From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Lester Caine [mailto:lester@lsces.co.uk] > Sent: Thursday, February 19, 2015 12:24 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Reviving scalar type hints > > 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. > > Now that all made sense! > > 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? I think the guiding principal for these conversions should be no data loss. This may mean we have different limits on different architectures, depending on whether they're 32-bit or 64-bit. Zeev