Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42305 invoked from network); 19 Dec 2017 17:30:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2017 17:30:22 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass 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.128.170 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.128.170 mail-wr0-f170.google.com Received: from [209.85.128.170] ([209.85.128.170:32838] helo=mail-wr0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/D3-10479-BAC493A5 for ; Tue, 19 Dec 2017 12:30:20 -0500 Received: by mail-wr0-f170.google.com with SMTP id v21so9284319wrc.0 for ; Tue, 19 Dec 2017 09:30:19 -0800 (PST) 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=h0/4O7bX391vr61jlfa4ktU/mcapEKLihMjQaBT735k=; b=CJAEULuOutuwHmyMrgSWKaUDMMXuCj+DEf7DT0D38wfGkBEHURq8hFzWIwFddhxXly fkSNvqGZzkLQVljfgdgY91wx4oQIBeV7eTpUptzy9lA3DnKhobdJ3h7fTvnzuSNmWz8P i0W0x0EE/FaRXfJh5ZhLDWBKyak44psmyMsihQHRXOLZCA8N9sOJbsN/V/slbDqOJN3Z HLgf68sAdMVC9yDTOTATUL8V8bGH1hvf4jZWNWE2goK9DMBq5QJW8Swi0kF72wghAYfa Tn03cdiGbsrCb/0GHJ7rYBScycZixKQ2ndwCLMEhs2MyxVGfdjHYag3QH/lv2VGTSOJd LM2g== 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=h0/4O7bX391vr61jlfa4ktU/mcapEKLihMjQaBT735k=; b=aKvSH5JzuK/BR5/cvXRf02fgNd0MfbLdJE9SUbvM3/PN+HAwm8KEr/AqYfNQSpHmuL c5b5WwhStxZEh7Jid/Xub+3a4YJE+urmgj7xz8OsKlL1O3VoIdK56FIKwubtj8aSKvLj idlJFuMmQ9hndqDVzOmHmNwA64CB9G1HnUIr2SsIoQP/KzMu+RqQVsByGUp3rsyOvGnk e/qiWbyQBm0dcJZ9pZm0oLsK/bP7174f6AqW65/IxFf1jyMDtbiXxBXBYRGQ1Z+qr3ke BFL3CZzLBf6NdvW5HQXoaHpUtI8tvf1zoNSMpjUv1K+vhf813ETbOwtUu0RQPCwQK+K9 +kww== X-Gm-Message-State: AKGB3mL8nshGux9HhwKZ7EhLWV6bRfmnzTB4UtK9ao1OBvLheslxM4ce YReuUaIFAxGmB+QtDc8MiMBxnESfsZ4IZZi3t5AMmw== X-Google-Smtp-Source: ACJfBotLJQrww0/o2WVuf30XVpHA/rRljaIVbHooALadlTYzmR2IryJ/ZERKugsIMgEKoJIOCt37d9k3FOI5n5fEcRU= X-Received: by 10.223.166.120 with SMTP id k111mr5625639wrc.125.1513704616757; Tue, 19 Dec 2017 09:30:16 -0800 (PST) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.28.21.68 with HTTP; Tue, 19 Dec 2017 09:30:16 -0800 (PST) In-Reply-To: References: <3a8054fd-b99f-771f-1f6c-29cf198acdeb@phpgangsta.de> Date: Tue, 19 Dec 2017 10:30:16 -0700 X-Google-Sender-Auth: 2GpLW3Lh5rBsekoV-c8bvW7ZELc Message-ID: To: Andreas Hennings Cc: Michael Kliewe , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Mixed Typehint From: levim@php.net (Levi Morrison) On Tue, Dec 19, 2017 at 10:05 AM, Andreas Hennings wrote: > We already have other "meta" types. > E.g. "callable" can be a string, an array, an object with __invoke(). > A "numeric" can be float or int. > A "iterable" can be an array or an traversable object. For correctness: `callable` is not the union `string | array | object` because only certain kinds of strings, arrays, and objects are accepted. > Personally I don't think we need every possible union, let alone intersections. How many do we need to have for us to make the conclusion we should stop making special-cases in the engine and generalize it? In any case we are straying off-topic: this thread is about `mixed` which I would vote against. As our type-system stands it provides almost no value. If our type system ever changes and it suddenly provides value then it should be proposed at that point.