Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98293 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48134 invoked from network); 14 Feb 2017 21:14:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2017 21:14:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-lf0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:34375] helo=mail-lf0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/B5-23443-64373A85 for ; Tue, 14 Feb 2017 16:14:47 -0500 Received: by mail-lf0-f44.google.com with SMTP id v186so72471267lfa.1 for ; Tue, 14 Feb 2017 13:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=IwkwG1JfBVrxu9w7q43o91lQMnxSzQ/ZP8KKlizyIL4=; b=YSGNlXBwL4e57WFR+/F2rAE8zo2VP3SZqnl4Wu3tNbWTeBLZkorDOFWqGaBGpCFyQu qY2QfoBZQtMoK5yIMgg0Re3Lt+RP9d2jL/bI9G1zkXi4TjMfrtnf7T3DUo512nfYTaJ6 ACdJlM0WI46ED17SlGhQLIACEc9fXKWU6rBdscChrSWzzBCiFr1pgBSEbHDEahYSoqJX RyW59OR5O7AX7DPKiO04huvGNZ4YnPJ+9vWcFgZI2UjNjKcnShFR/2lLqC5csM0+d0bF cUsFpSUkJhaHOzyrlpIUxKnm28DM2zPc0LK5vwxagch4/5gBHgoU4vy0WoVbrymcC9lB vZxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=IwkwG1JfBVrxu9w7q43o91lQMnxSzQ/ZP8KKlizyIL4=; b=auzMV7hOAmXJfTjTpNQddNQFvVn5VFdDlWAini/WOBOPbSaHQgyky3dUyHAVRZL6+o tSXd9jGlTP0qDssp/LVF6IREdXRKA3eyHYhc4sx5ntQ4m/ZgtnjjmoGaxgIk1OH3dk8p zhJ8sSnNTz1uC8spV86GIogVkJB8uHgsfEqLOfsGlsTInwhmG0ofMxS0kz+HFZguxOSZ Fl2XCPgOjWcI5I3Ht81MIOg3EcVStT0R6uKODQBz5LalFn9GZqKAhhge53if1fDiNjaI /muzYEuJYtr56zU4yyYdGZTZwsUUG/1vCc9PSDEvillRaJpP5Dfpumv9/KwVn2jMGwgL Ttyw== X-Gm-Message-State: AMke39kRBFf+Phzw3ahFXRnBzqDzL+RBMeQrxMnkk9OA//albDkOoMcBJVvSsCgxgIifDGgkYwN2etJQ7uaNHA== X-Received: by 10.25.28.199 with SMTP id c190mr9595731lfc.173.1487106884064; Tue, 14 Feb 2017 13:14:44 -0800 (PST) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.25.151.139 with HTTP; Tue, 14 Feb 2017 13:14:43 -0800 (PST) In-Reply-To: References: Date: Tue, 14 Feb 2017 14:14:43 -0700 X-Google-Sender-Auth: SuivBUVwM_7qQ3ib8Z5OZlUmovw Message-ID: To: Dan Ackroyd Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint, now with added variance From: levim@php.net (Levi Morrison) On Tue, Feb 14, 2017 at 11:55 AM, Dan Ackroyd wrot= e: > Hi Levi, > > On 24 November 2016 at 08:58, Dan Ackroyd wrote: >> Hi Levi, >> >> On 23 November 2016 at 01:25, Levi Morrison wrote: >> >>> For instance enumerations (or enums) are one possible type I can see us >>> adding that may not be objects. >> >> I very much look forward to the RFC for enums, and have for some time. >> When are you thinking of submitting it for discussion and voting? > > I can understand your concerns. At the same time, I hope you can > understand that people won't want to put off introducing features that > they want in the meantime. > > I think if you were able to give a timeline for when an Enum RFC could > be introduced, before the PHP 7.2 release, we could talk about whether > it would be right to hold off on this RFC for now. > > Otherwise I suggest Micha=C5=82 updates the voting options, and we open t= he > voting in a week or so. > > cheers > Dan Let me clarify that I'm not against this object variance; there is nothing intrinsic about object variance that prevents enums (or typedefs/type aliases). Rather it's *how* it is achieving that variance that is an issue. This is something that should ship along with full covariance/contravariance and not be a special case which may unintended side-effects later (such as preventing enums without breaking BC). Does that make sense?