Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97439 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60508 invoked from network); 18 Dec 2016 12:08:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2016 12:08:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:37676] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/F2-27550-A1C76585 for ; Sun, 18 Dec 2016 07:07:55 -0500 Received: by mail-wm0-f46.google.com with SMTP id t79so77666509wmt.0 for ; Sun, 18 Dec 2016 04:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mO4T9BqOoCXIN4xiDTPbdSFcEMrOjVkTevfx0vvI6VA=; b=O8lUBHffJ6AlorF2oIDNm13MJtNZuIoukP4qHJLei69dT9FT33e1ZMUQUGfADOXkGb Rdo5fqEkD8+KkE/8cgOTNo1tXnU7LSmyHTRgfPWGu/AunEtB1oDLVwK2TS1Q5H8q4MEE 8lTrEuqn/6bVkeuaKFX6vasdP3xu50Wll0i7e8QYp0NXe1iy2nTeQP0mUhJIoNL74tCT n+QMJO5ug8QyXnmJ12uShwDR8akGwx/1PO/Ia7zNTL3o6YtgLTr6X8HXAfTE7WHFUMKp XXwi4m+eg6AkB3tKexRUq9pq173o/ITwaoxIZl6auLOyAJXXbMpOdCdGA8OOSkJPDRJO SpRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mO4T9BqOoCXIN4xiDTPbdSFcEMrOjVkTevfx0vvI6VA=; b=ODX4zNFwjVpU9dypz7TM4OXw0EUhMPY9XICMOcVwmpmNidnixYWm16YCOK4KAjBybI u7Cj0wrJ2O/bb3DjIl10BPaEXT8ajE1ZXrtFHg/VyAyxDeyPqW+ropcqn1J79bJy/Agk uzRdUcK6TIcrjRPGJ51442afi327AIb+5U0YJe7ZWtecULr8EhY8tgpGhxarr1AprG6P 5prCZ1Z1H83takA7IBxf0lmuOxYLAk28Jgl7f/mwq9YOEg3XTS0/S/wgFFZUsiQc6O11 cGMnV6zq2gkppD+7BJly3BkGyyFW4YxUO7I2PF9v/mU4WMpja5O04bgNNbwSvuBqIJ3m PzQw== X-Gm-Message-State: AIkVDXJGxgFF4hpgGl3Oj5AC7WxypniUgRM2GyY9SuphzPxFdymAHpRm+tJdG0gf0OliHGrWF8puD7WuQoGhFA== X-Received: by 10.28.156.10 with SMTP id f10mr10244999wme.63.1482062872059; Sun, 18 Dec 2016 04:07:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.173.106 with HTTP; Sun, 18 Dec 2016 04:07:31 -0800 (PST) In-Reply-To: References: Date: Sun, 18 Dec 2016 13:07:31 +0100 Message-ID: To: Wes Cc: PHP Internals List Content-Type: multipart/alternative; boundary=001a114b4378062b180543eda71b Subject: Re: [PHP-DEV][RFC][DISCUSSION] - Throwables error code's type generalization From: ocramius@gmail.com (Marco Pivetta) --001a114b4378062b180543eda71b Content-Type: text/plain; charset=UTF-8 Hey Wes, On Sun, Dec 18, 2016 at 12:03 PM, Wes wrote: > Will be nice to have regardless if PHP gets stuff like enums. It's not > just a dirty fix. > > Strictly speaking it is not a BC change because `int` is not actually > enforced at all. Also this would be a problem in other languages... > According to this reasoning, all documentation should be disregarded and considered void, because type documentation is unenforced. That would also mean that any pre-PHP7 code that defined return types via docblock are basically unusable. The fact that PHP's type system doesn't enforce it doesn't mean that we should blindly allow everything everywhere, as that removes any sort of guarantees on contracts, making it impossible to reason about what the code will do. But if you think it'll be necessary I'll require 2/3 of the votes. > It's a core change anyway, no? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a114b4378062b180543eda71b--