Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109826 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46244 invoked from network); 24 Apr 2020 15:11:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Apr 2020 15:11:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 11B931804C2 for ; Fri, 24 Apr 2020 06:43:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 24 Apr 2020 06:43:28 -0700 (PDT) Received: by mail-ua1-f46.google.com with SMTP id u12so9418533uau.10 for ; Fri, 24 Apr 2020 06:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c55m6RiIPxbGJ2in2TiMiPG0FLQ5pRvZfNWU5rx9Qo0=; b=SiOsMiG+d79+36oZq7HIu/VHqTS5uOo/VUKS3cmmtI1ocVlv1qFuY1XWPItVs5bLwq zcxVene1Z9Vo+lLHSxJZUtPPYTb6MHC8J29BOMfMaciqDTPd4IXEGA5h1BSdjYLAMgfN +ng0mw+LaucZMThewVbHxdJJ3TomTOqAHrk7nCl9TsBvEs9ZsuQywW3AbrSshhrmBfvk Y8KY2fAWxIPz/0uvAvpjki7fR3kd02LmOn904gbKQGHZAzL/9ZZ86QwfbQMNhdNyiq8Z keS3McgUIqXTbxP1756V1ZGG9B6si97aKxAoRrZO8dw91Baxv+HGPxEb2IMH60poU+Yd 5Ndg== 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=c55m6RiIPxbGJ2in2TiMiPG0FLQ5pRvZfNWU5rx9Qo0=; b=aVls6hUAwFClxdmyNMS9tXnFV+3ZJ0M2Oye0ubwSrXQv2/27MvQKvjnFmDZRpWW9c0 Z/eunFT2eR0aN1Ey887Pbus3RC8OmgFew22rAq5dkZAvtoeWIMHRjv7MJjQ7xAhgvLn7 3BtXFIxdHLmOqsQ2qA9oBc7RGeLVt0bNEsI3iGGuAcOn9sKKN/JHRFhG7ook9xSckDNV HfT4c/mUIhuhO3xKwhuD1lsAqidsg/ggioiEgsCl0YMtYKbVner7Tb6cRFgvmk+TPEDE p8SocTXedcxVeayZhKjDHZxJSbhjm8ydKIPfUH/EnGtJY52maMscHX3l3oRrvAVlW7Jm jQxw== X-Gm-Message-State: AGi0PuZlvOvTmvML8FZlL5B5MmXqxycLoOO4awsd1sqUo3VNGTAAaGX3 PgqRzHXQKCAg6trh4z8D0VjHfzwNxRQWnrc15Bs= X-Google-Smtp-Source: APiQypKHSgjzXQg83jbTd/DlS+kvIktU+kGyBch7ukqM9UGalmWcEnbkHon/NGOpKEck/36InpUesi9BLV+MX1DcqOQ= X-Received: by 2002:a67:31c4:: with SMTP id x187mr8170957vsx.166.1587735806299; Fri, 24 Apr 2020 06:43:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 24 Apr 2020 09:43:15 -0400 Message-ID: To: Rowan Tommins Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000bb4fbe05a4098c5d" Subject: Re: [PHP-DEV] [RFC] Mixed type From: matthewmatthew@gmail.com (Matthew Brown) --000000000000bb4fbe05a4098c5d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > I'm not as strongly against adding "mixed" to the language as Bob, but I'= m > not convinced I'd ever bother using it. > I'm opposed to the use mixed in codebases =E2=80=93 I try as best I can to = remove it from any code I come across, and a static analysis tool I've built flags the use of mixed types whenever a more specific type is preferable. I even have an opt-in website devoted to tracking the percentage of non-mixed types in open-source projects, e.g. https://shepherd.dev/github/sebastianbergmann/phpunit Nevertheless, I think mixed should be available as a type hint for the extreme cases mentioned in this thread (e.g. serialisation). A type system without an explicit mixed type feels incomplete to me. --000000000000bb4fbe05a4098c5d--