Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104312 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67625 invoked from network); 8 Feb 2019 15:41:20 -0000 Received: from unknown (HELO mail-it1-f180.google.com) (209.85.166.180) by pb1.pair.com with SMTP; 8 Feb 2019 15:41:20 -0000 Received: by mail-it1-f180.google.com with SMTP id z7so8322993iti.0 for ; Fri, 08 Feb 2019 04:23:12 -0800 (PST) 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=rvYygsg4kmvb4Pz32Jfn6P7bjZjGNb/gOfjlqb0N3Pg=; b=T7C8UJcS+qHfojyY/DuCLFcLKzO5+AmXwK0OhXuBkrz7N3xLaLxlD34jFwwLsmH3NH DFrXHE707+VMeG7iE1gxk5BvhGQgw/phArykBplT7cOpHfRLUNj8X4PTMOYha8nERh+y Eac7nBj3V10i3cGzcXB6xIfJ9exkCEKI8collYr0aMseaW44mtL8UvDV3OdEWDVQbp+J sKvPsSH/FGfm48WY8XjlWwX8IHxgoMRzcr6bVrvK2da9rj7va/awgnM07SVzoFMFL+d8 ljt2H2/2myAK5fTdUUpxR0+80lGxzIQFFAtCPAW04f+xU6l0lcaPNGbUpMSJ/9Tdy1Bc ILBg== 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=rvYygsg4kmvb4Pz32Jfn6P7bjZjGNb/gOfjlqb0N3Pg=; b=sUfzgB4YMRd+oYTu+qQR87lgFJuwFQnaLx0Zg99j0wmJI7dmW1+6CoIh4BjoL18DMG q/K3gBF/+lFx3Wgv20eGjrIqwad4T1QjFqBDloYp68tjMuk/Tf8t0I3ZwC8XVMQMXcq6 UeoDeTGIEhSMVG7RFEArKB+OFGlUHW792QKuIvEI3YnU8xnHl2KcQNihtA611r31/XxV zbQtbd8+VWlPzNd4lL1whzUdG5Cdmn+NzEp1/pl4Wof+/IbbVk5U43EfO4GXFWU5rP7f 5t7xy/5ksWp2eW4jjmCIExeyKBr73pRiiUJA3hsRWizBbNCNpd7OALukvCpJ5XSW55Rf 0t/A== X-Gm-Message-State: AHQUAuYZZNZlHGCn/0kw6+MaHZq3Je+ajTWF37JZi22gH1yudLPKmL0k 1YWDDxY/p+KvEAlMzbWUKxKn5edDE20REJia1jE= X-Google-Smtp-Source: AHgI3Iba+/QqSVy1sl5u5D2LuBiDAetDVgz065qpYWPPpeF6apiHjRfwMjbqhziLiEPYY3/n2kVP5/HBL1VGpFou3do= X-Received: by 2002:a24:a141:: with SMTP id n1mr8570029iti.31.1549628592155; Fri, 08 Feb 2019 04:23:12 -0800 (PST) MIME-Version: 1.0 References: <695e24fe-386f-c11a-4bd3-81129cb9ffe2@korulczyk.pl> <42a5e3cb-358a-3e8e-0985-099263a57374@korulczyk.pl> In-Reply-To: <42a5e3cb-358a-3e8e-0985-099263a57374@korulczyk.pl> Date: Fri, 8 Feb 2019 13:22:59 +0100 Message-ID: To: Robert Korulczyk Cc: Rasmus Schultz , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000c4f5f3058161053c" Subject: Re: [PHP-DEV] Mixed type-hint From: ocramius@gmail.com (Marco Pivetta) --000000000000c4f5f3058161053c Content-Type: text/plain; charset="UTF-8" On Fri, 8 Feb 2019, 13:13 Robert Korulczyk Sounds like an arbitrary interpretation. Treating `?mixed" as "top type" > (including null) would be more practical and consistent with other > type-hints. > The PHP ecosystem (libraries) already uses `mixed` as a type including `null`. You can survey for usages of `mixed|null`, which is currently normalised to `mixed` by existing static analysis tooling (psalm, phpstan). Even then, by adding a non-nullable almost-top-type doesn't seem helpful: "here's something random, just make sure it isn't null". That's something more interesting for an eventual union type RFC (revival?). Could you clarify on a use-case for changing the semantics of `mixed`? > --000000000000c4f5f3058161053c--