Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51383 invoked from network); 10 Nov 2016 12:30:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2016 12:30:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 74.125.82.49 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:35046] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/13-15787-85864285 for ; Thu, 10 Nov 2016 07:30:19 -0500 Received: by mail-wm0-f49.google.com with SMTP id a197so364969976wmd.0 for ; Thu, 10 Nov 2016 04:30:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LPvb10OpoEhYIDo8wNhsGQ27WUtQs6OMpCgdzmmZOak=; b=Tb0M3DrhNda1Qh+0gd0OZxqO1iDrwNNfwoyxUESUrpHny7wNoPPmXR8mYZO9PLY8Uy UcQI+DQmGEsBAcOuHBhSvRkQuf/3GfeYUAXTHOqG724kcCGCCiXJduOyOjKtSmDWq71A HfbD1Dr8FgxtMxtv2Sw0084AENjzih6JhUXnfRGORjoK38hL0Yd1fnnh6VSQxb1//B1D swTyRRega/9/CZLU+cOeyes2Zry4r+670+h2IX7ue18vqMqRvJeKMrdSgbWukwFFwEX4 2/U8dBd0LEvqcqmDK1pwqQl8tsQrQdrtYvsIzmKYvp6zkmu8oXlXzWFGJ9IzV0u1wodT JYaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LPvb10OpoEhYIDo8wNhsGQ27WUtQs6OMpCgdzmmZOak=; b=enUPbeEyKVQs4aP4mKmvO/slFAYQnUPb5kiiT1kzAYuQXqqhMemwY+ubiG8M3ebj1a OGhfYTndaiVzx1p5hlohW9Jg752Pp4smTaMaDHjuHnn3+iAzNQWCYKfjaCBArDgsUSoJ bF8My545ZadDqYsZ8Vzhb3QtwARmy9LNtxVVjhq611JptCLdsWiIFSIBOeSjHJIeQajQ E6P1z1qS++/q1H8yQoVcMkDWbppfhU1B0oSckxG5iLXw2gHtZo05HK/hZYLlXWZX5HA7 9Gnl6neOjxYfnKE196eVR2npXVXpJfI9cfMBcN3zQHXZeTz5/eVBBwzqjgRnRA/aTL1D jcuw== X-Gm-Message-State: ABUngvdz+nQnL7ejobvxFMmFNfgu2j7xJ+Qc1fGlEY+FczuKMFvW3dBq6B6kJmidlG2AuTg0b7tMVlmu2A9zEg== X-Received: by 10.28.145.134 with SMTP id t128mr24811950wmd.50.1478781013587; Thu, 10 Nov 2016 04:30:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.161.230 with HTTP; Thu, 10 Nov 2016 04:30:12 -0800 (PST) X-Originating-IP: [109.157.245.230] In-Reply-To: References: <0c171a20-c72d-4157-1117-6628a52dd1f0@gmx.de> Date: Thu, 10 Nov 2016 12:30:12 +0000 Message-ID: To: Levi Morrison Cc: Niklas Keller , "Christoph M. Becker" , =?UTF-8?Q?Micha=C5=82_Brzuchalski?= , PHP Internals List Content-Type: multipart/alternative; boundary=001a1146ec36040dcb0540f18919 Subject: Re: [PHP-DEV] [RFC][VOTE] Object typehint From: pthreads@pthreads.org (Joe Watkins) --001a1146ec36040dcb0540f18919 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Levi, You are assuming it would *need* to be removed :) Future RFC's must deal with the engine as they find it, as this RFC has done. If it is true that this would prohibit enums being non-objects, and I'm not certain that it does, then enums would have to be objects, if that's how they find the engine. If your only concern is about a non-existent feature, then maybe you're concern can be alleviated by the non-existent JIT (which does partially exist): With a JIT, it doesn't much matter what represents enums anyway. These are problems for the future, not today. Cheers Joe On Thu, Nov 10, 2016 at 12:20 PM, Levi Morrison wrote: > On Thu, Nov 10, 2016 at 5:18 AM, Joe Watkins > wrote: > > Morning Levi, > > > >> There is a future compatibility issue of this same type with `object`: > > > > If that is an issue, it is for future RFC's to deal with. > > > > Cheers > > Joe > > > > > > On Thu, Nov 10, 2016 at 12:12 PM, Levi Morrison wrote: > >> > >> On Thu, Nov 10, 2016 at 2:11 AM, Niklas Keller wrote: > >> > 2016-11-09 21:53 GMT+01:00 Christoph M. Becker : > >> > > >> >> On 09.11.2016 at 17:28, Joe Watkins wrote: > >> >> > >> >> > I want to explain why I voted no on this: > >> >> > > >> >> > I think it's significantly less useful without variance, > variance > >> >> > is > >> >> > something that is usually difficult to achieve in PHP, but not fo= r > >> >> > this > >> >> > feature in particular. > >> >> > >> >> Can you please elaborate what you mean with variance? I see some > >> >> practical use cases for covariance of a method with return type > object, > >> >> but I don't see how contravariance could be achieved for parameters > of > >> >> type object. > >> >> > >> >> If your suggestion is only about invariance of object return types, > I'm > >> >> not sure if this very special case would make sense (for consistenc= y > >> >> reasons). > >> >> > >> > > >> > We already have it for iterable -> array. We would have it for all > other > >> > types if there wouldn't be an implementation issue. > >> > > >> > Regards, Niklas > >> > > >> > Cheers, > >> >> Christoph > >> >> > >> >> > I absolutely want it, but I want it to be properly useful. > >> >> > > >> >> > If the RFC were halted and patched to include variance, I'd += 1 > >> >> > it. > >> >> > > >> >> > Cheers > >> >> > Joe > >> >> > > >> >> > On Sun, Nov 6, 2016 at 5:28 PM, Micha=C5=82 Brzuchalski > >> >> > >> >> .com> > >> >> > wrote: > >> >> > > >> >> >> Hi everyone, > >> >> >> > >> >> >> Two weeks have passed since this RFC was put to discussion here. > >> >> >> > >> >> >> Therefore, I'm going to put it to a vote for inclusion in PHP 7.= 2. > >> >> >> > >> >> >> Voting starts today, 2016-11-06, and will close after two weeks = on > >> >> >> the > >> >> >> Sunday 2016-11-20 at midnight. > >> >> >> > >> >> >> The RFC and voting widget can be found here: > >> >> >> https://wiki.php.net/rfc/object-typehint > >> >> >> > >> >> >> It's a normal 2/3 majority required vote. > >> >> >> > >> >> >> Thanks! > >> >> >> -- > >> >> >> regards / pozdrawiam, > >> >> >> -- > >> >> >> Micha=C5=82 Brzuchalski > >> >> >> about.me/brzuchal > >> >> >> brzuchalski.com > >> >> >> > >> >> > > >> >> > >> >> > >> >> -- > >> >> PHP Internals - PHP Runtime Development Mailing List > >> >> To unsubscribe, visit: http://www.php.net/unsub.php > >> >> > >> >> > >> > >> In a return type context `iterable` can be changed to `Traversable` or > >> `array`; it cannot be changed to `Collection` as we cannot guarantee > >> at compile-time that `Collection` implements Traversable. > >> > >> There is a future compatibility issue of this same type with `object`: > >> right now the only user-definable types are objects. However, enums > >> are an often requested feature and they may not be objects. Thus we > >> wouldn't be able to guarantee that `Foo` is an object. There is a > >> draft RFC with a patch for enums and expect it will come to a > >> discussion soon, so I don't think we'll have to wait very long to know > >> the answer here. > > > > > > I strongly disagree here; once we add `object` return type covariance > it cannot easily be removed. > --001a1146ec36040dcb0540f18919--