Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75478 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14070 invoked from network); 14 Jul 2014 15:46:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 15:46:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.173 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:51195] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/C4-25444-B4BF3C35 for ; Mon, 14 Jul 2014 11:46:20 -0400 Received: by mail-vc0-f173.google.com with SMTP id hy10so3676710vcb.4 for ; Mon, 14 Jul 2014 08:46:17 -0700 (PDT) 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=9JwvwIcpBsYVAuBwwJqQ9jYxFCXZJjg3cR7afnxkyTg=; b=GM3SOTE/bY56qLd7dq21bLHUeI3FXx/xOuiUd0MrFKDJYilJ1AL+llNwoY8iuBt8zf /AExwVKEuADaq7gAyxV8bp2rXekrG36QHpSwrLrQqL2uroa8Wh0KnnVDcQPzzr9/Ybl3 OafC0DMbd93Gy7FJ0AQ3hp8sbB4RGUnKEAdIrQMwruS32e/ZK2476RJve4oNSabzRXbD A+tZciel9ZJkiEaiYIzSlNMGZxx6T5IMPTCqGtXtlklSNql8eC18rDtkgj0lIdt9eLsv Kp3NlY0OIShNnkfAgqme8ktLK2ljp/c4y7bYxLzcEKukgDDFeV89SGKeRfdPTYyd8XTq qlhQ== X-Gm-Message-State: ALoCoQl7icYZBjolFvoKk4ycHWw07p56WoHifBKRjaLzXGF3Rs5ykEhHKoYo8a9yA2cJjD3lMffK0rrG1h/ae5TOXNfoQ3MqZx9F8WFQYewjQfYhBR0boy1V347+/ItXi7qRwam3RT8h X-Received: by 10.58.245.194 with SMTP id xq2mr3543564vec.26.1405352777439; Mon, 14 Jul 2014 08:46:17 -0700 (PDT) References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <53C3F70A.7010706@gmail.com> In-Reply-To: <53C3F70A.7010706@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJuUFVOlGiX172RfpkkW7aXwqSXwwHleMkPAd/qfJcBzHP03AGqtGtJmihvbEA= Date: Mon, 14 Jul 2014 18:46:16 +0300 Message-ID: <3aa29e080d70c843713e19a952dfbad6@mail.gmail.com> To: Rowan Collins Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Rowan Collins [mailto:rowan.collins@gmail.com] > Sent: Monday, July 14, 2014 6:28 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) > > Derick Rethans wrote (on 14/07/2014): > > A compromise by adding more inconsistencies. > > The only way of not introducing some inconsistencies (or, to put it another > way, new features) is to use strict type hints Actually there's a pretty simple way that's not strict type hints: 5) Add type hints using existing syntax, which are casts; Change casts (both existing and these new ones) to emit a new E_CAST in case of data loss or 'bogus' conversions. Zeev