Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109718 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10581 invoked from network); 20 Apr 2020 15:21:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Apr 2020 15:21:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 220361804CD for ; Mon, 20 Apr 2020 06:52:14 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 20 Apr 2020 06:52:13 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 8A360578 for ; Mon, 20 Apr 2020 09:52:12 -0400 (EDT) Received: from imap7 ([10.202.2.57]) by compute7.internal (MEProxy); Mon, 20 Apr 2020 09:52:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=x5cKrI QIvsAGrV4PxIak8WvTr7EEGLHQmUTo1ydtNhc=; b=ERAaYCctvuQmCVV+daSF6L JM1ImKm7tm1pcTdpNvahnFz3DlWDKI9qS/nbDPn3SrL/LTm5HR6Pbh95ZwpGx1Kq g333jMwxzkROKNIdfhFZi8NoozR6EUWp34TIohGWtbuePNST0Ssl1Rcvb3nmPdGj 4f3FQHMO9dh8Mkf+o1ADi/CL7dTOBtN7HizPQkgynhB2yFrwc/9dW0cQKQ2dACJi iuSh26qN0rUooXVBVTYIMjniL2uMMVd3MQDCxHPux1iPciF0Euwcz/0WoCoxxrAZ ZxmbGBa5HuCxGWIak2ule4/y+Mqm0ljpD2IoKAH8KX6cplMhDCIUpfqQu5ll7rQw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeefgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E48EA180091; Mon, 20 Apr 2020 09:52:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1152-g08c8976-fmstable-20200420v1 Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Mon, 20 Apr 2020 08:51:51 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Mixed type From: larry@garfieldtech.com ("Larry Garfield") On Mon, Apr 20, 2020, at 6:17 AM, Dan Ackroyd wrote: > Hi Internals, > > Here is an RFC for adding a 'mixed' type to the language: > https://wiki.php.net/rfc/mixed_type_v2 > The RFC builds on an earlier draft by Michael Moravec. > > Part of the motivation for pursuing this RFC was my recent experience > in upgrading an application to PHP 7.4. > > Being able to add types to the application made the code much easier > to reason about, but there were places where I couldn't add type info > due to the lack of mixed. That made it hard to see if that piece of > code had been upgraded (but type info couldn't be added), or if that > code still needed to be upgraded. > > cheers > Dan > Ack I am not against this, but now that we have Union types what places are there where the currently available type declarations are insufficient? Resource seems like the only remaining gap where you'd be forced to use `mixed` instead of a union. --Larry Garfield