Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102551 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24177 invoked from network); 1 Jul 2018 21:47:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2018 21:47:01 -0000 Authentication-Results: pb1.pair.com header.from=levim@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.208.180 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.208.180 mail-lj1-f180.google.com Received: from [209.85.208.180] ([209.85.208.180:38180] helo=mail-lj1-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/F8-15351-3DB493B5 for ; Sun, 01 Jul 2018 17:47:01 -0400 Received: by mail-lj1-f180.google.com with SMTP id v15-v6so11076914ljk.5 for ; Sun, 01 Jul 2018 14:46:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zDTQGkNzX/nZAQYxLVEvjQrYDfAyA7Fd5In1tufhGnk=; b=mZuLaYOJxvK8QL+U88IHJ1FhXiDjLtIO39ANA+nDATkpkL7AXr4oYKD11w++Jts/3n tvSBd5ddB9AErXD6z6rsza7wwOtFF4nkFcBnuUIUPUw0CrnSEMRnbLFldtpbq614zEMN Y/OrQxDP4gVxo0oHWlRmxi0BvFnIImlGxOAQ6BYoTyJyLYPyDSvmYcgPs2SMez2O4kZj SHfwsrlwM4ryabC+V+UOWSRshTO3skymhecMmA39I5DdB0rUQuhySgYm9icWV7Qp6SsL vL56q94jWKm3crDJldJ9cooNhhskN3xSptpDG60V0dBifw2Yi/C9RW5Qo+KMtW4ckLyk njQQ== X-Gm-Message-State: APt69E0L0m0gAU5qLdn/i1G6XV1rH42QLnbIWyigEyQjvmwkQM6pD+1c 7Y5+8d+RfPn1PKEb1iqtbNL1uIhdpsogKd1fp2I= X-Google-Smtp-Source: AAOMgpd5+G5vtp4uuJxRn3X9tsr0ZwEPyCaDy6xJSr3hi527zRHOfZbRaX1LoGTS+JUeB8Ea8bN6vgNUalJhWfkDA64= X-Received: by 2002:a2e:5617:: with SMTP id k23-v6mr10685271ljb.86.1530481616746; Sun, 01 Jul 2018 14:46:56 -0700 (PDT) MIME-Version: 1.0 References: <854a8dfc-4bc1-c001-a1a7-5347e5483ac8@gmail.com> In-Reply-To: Date: Sun, 1 Jul 2018 15:46:44 -0600 Message-ID: To: Rasmus Schultz Cc: Nikita Popov , Sara Golemon , Stas Malyshev , Gabriel Caruso , internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Mixed type From: levim@php.net (Levi Morrison) On Sun, Jul 1, 2018 at 11:27 AM Rasmus Schultz wrote: > I think we'll need the mixed type-hint in any case if we're to move > ahead with generics? I think Rasmus is alluding to this: interface Iterator { // rest of impl } So that we can make things generic but backwards compatible. Is that what you are referring to, Rasmus? ----- The name "mixed" has been in our manual for over a decade (possibly closer to 2 decades) so I am fine with adding it to the language even if I would prefer a different name for the semantic. I think the most common name in other languages for this type is "any", which sometimes excludes null, so "?any" is the same as "mixed". I prefer "?any" but would still vote in "mixed". If we are going to add it I would prefer that we: - Add a deprecation notice in 7.3 informing users that they need to change their name. - Create "mixed" or "?any" in 8.0. This is the responsible thing to do if we are going to add it. There is no functionality in 7.3 that will require it so there's no rush.