Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99216 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62620 invoked from network); 28 May 2017 17:06:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2017 17:06:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=aidantwoods@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=aidantwoods@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: aidantwoods@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:37662] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/26-06590-BA30B295 for ; Sun, 28 May 2017 13:06:51 -0400 Received: by mail-wm0-f50.google.com with SMTP id d127so32016611wmf.0 for ; Sun, 28 May 2017 10:06:51 -0700 (PDT) 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; bh=4DF2wsF/yEoXXhz8qhwLTJTWQdcmP+rJMYNh2wMM8PI=; b=k9IvtxdIs3FH8AsbwrtOqMu+LhY174KZZP8I+p/DLhzGIY61qs7FKFV266APqybOKX 7VvdroYu+oVymYdHJ5s40cfK+OI9Qputwd35Ze/H3mZjSzg4Ezapg/s5G8oU9SjXKH1C 2UjbiOHQpXanEHTpB3W9McKE3D5KpQEFZavPJEF6DMfkoDtBRZJ+ruW2oSQ9TKEOKO1R 0M+MR/a1glrsfBvbcjp5tyfi6XqDYuxT5/TEyqz2W16xMjYRhBaYWCKdZp0zB6F8kdCh 9BfXbSJv6T/biFAJiu0LdcNh+T0Nlpp64lgwg7RQTWzGdM2eubaiUesEsCoAlUcNU3oa JqSA== 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; bh=4DF2wsF/yEoXXhz8qhwLTJTWQdcmP+rJMYNh2wMM8PI=; b=tgIMA8yvPo5rFsx9MzIeKL299TcSJ21FsXHfu3c92qSo8O459XifRjN5C2rIi2kYP4 4UTq7d4ygfmgLunCCp/fdObpiYKJi7qPKWEp8/SISQ40sLCCgXmNFnBzANFnxtONpGD2 RZwt3oADRHnPVoPf5tbSKt6lk3AL0mHqb67ueApPZmQtfxCc9P3j9qCpdEQB/4t/PRsf jU5IbKH0wxkcH7qi8cdYDcOdC7wpbOk09L9UDqSfe0yW0uAfgEYMjbtPEwVwnMWcspH0 RTt37L3TufeqIJIbExW3EKGAwEdgXzNVbeie3SRZKnAot58mL1QLJtDwkmg7k3HtZz05 8uIA== X-Gm-Message-State: AODbwcBd6N8C+eE1ceVTlMuZU/UYkG6m6LZ+OAqoWvVFhwm6bN/cY7Pj hDFEEG79VlxKS2E52SacWTMhaMd2l+cXln4= X-Received: by 10.28.232.213 with SMTP id f82mr8089567wmi.69.1495991208296; Sun, 28 May 2017 10:06:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.167.5 with HTTP; Sun, 28 May 2017 10:06:47 -0700 (PDT) In-Reply-To: <8de6a2ef-9602-e489-f19c-001005626b87@gmail.com> References: <8de6a2ef-9602-e489-f19c-001005626b87@gmail.com> Date: Sun, 28 May 2017 18:06:47 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="001a114691408ec74205509898c2" Subject: Re: [PHP-DEV] Parameter type widening RFC From: aidantwoods@gmail.com (Aidan Woods) --001a114691408ec74205509898c2 Content-Type: text/plain; charset="UTF-8" So, if I understand everything here correctly ``` interface Foo { public function bar(Boo $Boo); } ``` and ``` interface Foo { /* * @param $Boo, pretty please accept type Boo here */ public function bar($Boo); } ``` will be equivalent in 7.2? :( Regards, Aidan On 28 May 2017 at 16:49, Rowan Collins wrote: > On 28/05/2017 14:25, Rasmus Schultz wrote: > >> With an explicit mixed type-hint, you can still achieve what you want >> > > You are making a valid point in general, but you clearly haven't read or > understood the explanations you've been given why an explicit mixed > type-hint will NOT achieve what the authors of this RFC wanted. > > If an existing class implements a library's interface, or extends a > library's base class, with no type hint, then the library currently has to > break both backward and forward compatibility to add type hints: the user > of the library will *have to* add the type hints to their implementation, > and once they do so, they will *have to* require that minimum version of > the library. > > If the user of the library has to add "mixed" to all their method > signatures to use the now-type-hinted library, the library still has to > declare a breaking change, so that feature would not help this use case, > even if it would be better in others. > > Regards, > > -- > Rowan Collins > [IMSoP] > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a114691408ec74205509898c2--