Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99081 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50423 invoked from network); 17 May 2017 16:43:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2017 16:43:59 -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.223.178 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.223.178 mail-io0-f178.google.com Received: from [209.85.223.178] ([209.85.223.178:35440] helo=mail-io0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/07-21791-8CD7C195 for ; Wed, 17 May 2017 12:43:53 -0400 Received: by mail-io0-f178.google.com with SMTP id f102so12888587ioi.2 for ; Wed, 17 May 2017 09:43:52 -0700 (PDT) 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; bh=3NQzNbvc0EG0A4ovavRp+EL1215EdXuGwYw1dkPibq0=; b=rGjkVytqTrraFuorXPX2sY3nCmC4Zciewe1j/7jy/W3IVEW9LLDPYl1yj9HfK+7SdU pBKR8qc2Jp2dFG/irw+hvbfDDdBIIEuo7NqvBRp/p5lpEWQbAFrdzIwBxvcWYh/LJLZf lSTHAbiJLp4TjipI1HauiCAU2gghxAo/6qK9bk2oBr0D1EQ1KfoRpQkyiNmCSaA1k5lw YYRaoF6Ia50XxEUl2r6yN6fCycVlydqYKjfBDnpk9VuMqpmzwzvWTsP/Iat3X/uGcerU /g76v1clhfINAQsKho0Iewh2+XnPv59/fSO3WnRWdzffJ6qqNy2lq89ATjl1wO/FPPxp e1bA== 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; bh=3NQzNbvc0EG0A4ovavRp+EL1215EdXuGwYw1dkPibq0=; b=BJwNAc4EHKHuPiFE0zweBqBQ0Ew9ydCJJs7IwmKMLneldEWpj+2cyEzDiLe2KQrKSv v2RasEY1jilOg0Mr4a0H3vJIvZOuC+hQ8Gp1n+1mT28Q8Dp1zX6/d8B9brAbJMNJKAlC tEFwOzMXzAsWdoyRPiYXypeymX320LAOyH2qR+tX06B1K9LKHtTbDCv7z6Gq0LBI0kUz XWu5eTnpEDT6q6Z+2OoVi9a0Z/WsJDvbddxz1oU/ZSdDiCx7g81rPo0TP5FAruaxogR7 g0eN2bJB1N3lvImEZtA90CrRRtWoqgMr83ygcK7mPVq7o61Pthxk3sMIWB4btzMQrhMy YhkQ== X-Gm-Message-State: AODbwcBfcjv+Xz5mc/qJN4CnfIKdv28vCcRiA7r6CpvhRqtfe5J1rdhV rhWeNApeVVX5LXyW6XZcTBnPpJ6RevDH X-Received: by 10.107.170.16 with SMTP id t16mr4075217ioe.113.1495039430153; Wed, 17 May 2017 09:43:50 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.107.12.159 with HTTP; Wed, 17 May 2017 09:43:49 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 May 2017 10:43:49 -0600 X-Google-Sender-Auth: 8PRp2-xTNo4QXrJKVFb3ptBAmVI Message-ID: To: =?UTF-8?Q?Micha=C5=82_Brzuchalski?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="001a11427a6028dbcb054fbafe0a" Subject: Re: [PHP-DEV] [RFC] [VOTE] Object typehint RFC From: levim@php.net (Levi Morrison) --001a11427a6028dbcb054fbafe0a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 17, 2017 at 10:26 AM, Micha=C5=82 Brzuchalski wrote: > Thank your Levi for your explanation. > > 2017-05-17 16:47 GMT+02:00 Levi Morrison : > >> >> >> On Wed, May 17, 2017 at 4:34 AM, Micha=C5=82 Brzuchalski < >> michal@brzuchalski.com> wrote: >> >>> Hi everyone, >>> >>> I would like to put Object Type RFC up to a vote for inclusion in PHP >>> 7.2. >>> >>> Previously there were some concerns about adding named types in the >>> future, >>> but we came to the conclusion that each of them can be solved if there >>> are >>> proposals in the future. >>> >>> Voting starts today, 2017-05-17, and will close after two weeks on the >>> Wednesday 2017-05-31 at midnight. >>> >>> The RFC and voting widget can be found here: https://wiki.php.net/ >>> rfc/object-typehint >>> >>> The vote is a straight Yes/No vote for accepting the RFC and merging th= e >>> patch which require 2/3 majority. >>> The additional vote is also a straight Yes/No vote for accepting varian= ce >>> behaviour on the object type which also require 2/3 majority. >>> >>> Thanks! >>> -- >>> regards / pozdrawiam, >>> -- >>> Micha=C5=82 Brzuchalski >>> about.me/brzuchal >>> brzuchalski.com >>> >> >> An emphatic "no" on variance for me. This is for two over-arching reason= s: >> >> 1. Object variance should be implemented when we have generalized >> variance for all types. By special casing it now we open ourselves to th= e >> possibility that its implementation or semantics will differ from the >> generalized solution. >> >> 2. The way it is implemented prevents us from adding new types which >> are not objects. The reason is that the way this is implemented it just >> assumes that an unknown type is an object type. If we add a feature such= as >> an enumerations (enums) this assumption probably breaks and cannot be fi= xed >> while maintaining BC as it would almost certainly need to trigger an >> autoload. >> >> > We were thinking about enumerations and generally IMHO, they can be > implemented as objects though. Especially when taking Java pattern > http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html when dealing > with enumeration means dealing with a special purpose and special kind of > objects, which are IMO more powerful with methods which can implement som= e > behaviour. > I'm not intending to derail the thread but let's consider your statement: your proposal constrains us to choosing something Java-like instead of having all options. Think closely about that: you are advocating that we constrain us to Java-like enums when there are many, many options and we get what for that trade-off? A simpler way to implement variance for the object-type only? No thanks. --001a11427a6028dbcb054fbafe0a--