Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99130 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14815 invoked from network); 23 May 2017 19:25:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2017 19:25:38 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.192.174 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.192.174 mail-pf0-f174.google.com Received: from [209.85.192.174] ([209.85.192.174:33765] helo=mail-pf0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/02-10292-0BC84295 for ; Tue, 23 May 2017 15:25:38 -0400 Received: by mail-pf0-f174.google.com with SMTP id e193so123778786pfh.0 for ; Tue, 23 May 2017 12:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=9Kuv81kN1rWXoSg7lXoizK/i7BaH+QfALYvzBQ+4sf0=; b=k7JFNC0pOnzEhLaGyK7ehW075Qmrp8uJ9GXUuuUffKovovSZcaICOh7oTVrUUsWlmJ emM9+hVKEEuA/7V4dVO9V8GT59C6wnLhk7EjOWADGRv+vFagsKq06rpDAF6wdFsEGRyD Io4W92Ag/Obe6wS9b7sAg7xDBuM15eh0G62SaJu2slMc14tPE4tXgDOdUQHaVw/94NYG hVkRHi8T2o0VeghqVKXjq249ipDHmHCFu+CJg3LS3hWoAHaxVJgSlSoZ7pNdz4tpQayr oN+bnCdHxztKRKjM4UmtRHH8omDJPc6/p9g4zuvO4CpzQ8NQEcJibaoZWDvQlPYb7rm6 3wAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9Kuv81kN1rWXoSg7lXoizK/i7BaH+QfALYvzBQ+4sf0=; b=EIRwrcR51cAowmDNPJToDTiuNCh7FVkdz4f89KHnlsy42dfP4k0HhqNWLe16Eig2To m9CqJviDPkFuNu4rJc7W8+y851dX9KLUZFrsRQRDfYr0EWATSQMI2+eUMl4RZwZQdozl u1j2TZBfwN8X38i68K/sgXRK1jpqzs1fl9UIYE487vC3xtScDYyWcYHHMsWplVumBWJ1 mnMG1Tex1IDj4MoQGq5Dw6hyNMKtEU/tNAgtAvQl4A8Ujll2cxwg42FZnoj76XACZ3Tv GX6F8/UbtbEWL6ho0sN9MZo793Q5+PfoWAUfhQIct89IhGcy3DlN1eZLNPeEML1oBo04 Q3zA== X-Gm-Message-State: AODbwcC++A/Z73h+TrzMtAPAuZ9FC6fWT6ExAhY4tr69srbo1zo6ZlCO Z6kNsUnItKakQJDcvoaJ92pCiLzUFMt2pbVu0w== X-Received: by 10.84.141.36 with SMTP id 33mr37093405plu.99.1495567533177; Tue, 23 May 2017 12:25:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.131.23 with HTTP; Tue, 23 May 2017 12:25:32 -0700 (PDT) Date: Tue, 23 May 2017 21:25:32 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="94eb2c11a7208d93f2055035f3d3" Subject: Parameter type widening RFC From: rasmus@mindplay.dk (Rasmus Schultz) --94eb2c11a7208d93f2055035f3d3 Content-Type: text/plain; charset="UTF-8" This parameter type widening RFC, I didn't know about, but I have a remark. The feature, as implemented, will allow accidental omission of type-hints, will it not? Previously, the implements keyword guaranteed a correctly type-hinted implementation - it's now possible to (purposefully, obviously, in certain rare cases) omit type-hints by accident, making the implements keyword much less (or not any) of a guarantee that the interface is implemented correctly. The addition of an explicit "mixed" or "any" pseudo-type would have made this possible, without losing the guarantee that the implements keyword used to provide - that is, it would have been possible to have this feature for the few cases where it's useful, without affecting safety in the majority of other cases where it's not. I feel like this feature takes a pretty dangerous shortcut by simply removing a constraint check that we used to have - in favor of supporting a few rare cases, we removed a guarantee that interfaces and the implements-keyword has always provided. Those rare cases could have been supported in a safe manner by introducing a "mixed" or "any" type, which would have made the use of this feature explicit - which would have removed the risk of accidental omission of type-hints in the majority of cases. The RFC page doesn't link to any discussion, and the Github thread was shut down after some negative remarks. I didn't see a discussion or a vote here on internals - did I miss something? Where or how did this get discussed and passed? Are these discussions happening somewhere else besides internals now? --94eb2c11a7208d93f2055035f3d3--