Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109823 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19917 invoked from network); 24 Apr 2020 13:40:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Apr 2020 13:40:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3E4981804CB for ; Fri, 24 Apr 2020 05:12:13 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2059.outbound.protection.outlook.com [40.92.91.59]) (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 ; Fri, 24 Apr 2020 05:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hUjNs2wJ7HrPk3+Ftfel1IgjbIL/exshB2JpP+q71iZkNBmPRNyNkugpEyXzIJWsVYFex9+SQ1x2IVFrmNayViK5LqpRGCGqjDZNmtaA/tImcFDm0bR+GFnUDuqZUzil2V4sQSSlYVS/K5NanZa3+359heZwEup/jvQPKRb25DdRRr+0pSowxbzc47rjYv2Vc3fT1LHjJB+QpMt6MlSaQtwrqw0lbAUsJEpCv7K1bglyfOHJmH7bF7CfJwPISAEOr14yP0t6ObAh/6X3JGduo1KRfhy8gn4q226/NWrOvpicBwqRse9v/yW9CyZakm3Fbg11Lw0J5xRWRSLkbu7HcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oM2lLSmTf+i/DxBO+MVueq2yXmuCmzVq+jRP2qgM8ns=; b=ZjMMnBXjfYGU3B8WrS8GolKPTt07WitX8R3Pa9mFlIqK7Dwn+XD5Jkma+kwujctckJFzdtlRi9hC6LTWJkQ9B6pJMTVJEHPz9QMOk1X1kxtIm/YUEuBwR1oIpMZ6ox4JldeCPuAr3nREd1PzfoLn2eb26vW2fBbZnzU15T3SqutRtdJ5xds+Q0GFICkZeGcMcEA6jPZCWhE3yWxXMLHByN8d2r01RFXxvApp2zmNXQJb3Xay4yWuK+JG2e2XIOYLpaFZT0A2l7z7q+6QRePmdCZz3pg/U+B/+sqfHVpS7GYkEvzlhLHTunFJvaz3BbIU2pVj8e2ZLtoiRbMrpV4nMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.com; dmarc=pass action=none header.from=hotmail.com; dkim=pass header.d=hotmail.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oM2lLSmTf+i/DxBO+MVueq2yXmuCmzVq+jRP2qgM8ns=; b=dut6MjHXJavLV5hCtoFjHmQ+Yg7D1ViQ8I8iIacvxs+y52Lp5dggEJTBXzt975aHQKQeD6kRt4HFGmdy7t0eVaXKe3bSI5mvna7udD5qiBs4v6eD8hlhWC3hNPbjN9zKQ1Qe6zJ/tLtwKrX09KtIpn1oRrQtCrfGXYl+5OjX09oOQ1fxJJGBQ7/0NTYCQY5cWuPhb6il/OzWxFEL4auJe6SJmjmJoYOnwrrFqFfesQ0aiV+87W58dZZXKdMG/NYNugdj9kPBk108opNRYdcjIX38bkBRc2kBEHuELxuqGlXd+Bv4haBLs3WRejfvvlwKyDizBM/3ah2q3tQTFQmR+g== Received: from AM6EUR05FT029.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::4b) by AM6EUR05HT241.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.15; Fri, 24 Apr 2020 12:12:07 +0000 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com (2a01:111:e400:fc11::48) by AM6EUR05FT029.mail.protection.outlook.com (2a01:111:e400:fc11::74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.15 via Frontend Transport; Fri, 24 Apr 2020 12:12:07 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:39B73628ADA763AF7E9E67F1C0B1AEF093FB7AA1A03A328B63E5686EBDDC3BC9;UpperCasedChecksum:441F2F3C72657C9C9CB9D714FEEF7414B0C2F724A5A102D3B8A267F64A0B4231;SizeAsReceived:7765;Count:50 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::61d8:9f5e:4baf:492d]) by VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::61d8:9f5e:4baf:492d%7]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 12:12:07 +0000 Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Fri, 24 Apr 2020 14:11:57 +0200 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Dan Ackroyd X-Mailer: Apple Mail (2.3445.104.11) X-ClientProxiedBy: PR0P264CA0103.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::19) To VI1PR02MB4703.eurprd02.prod.outlook.com (2603:10a6:803:8f::13) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:7e8:cba2:c100:1d9:c36:bbf3:36a6] (2001:7e8:cba2:c100:1d9:c36:bbf3:36a6) by PR0P264CA0103.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 12:12:05 +0000 X-Mailer: Apple Mail (2.3445.104.11) X-Microsoft-Original-Message-ID: X-TMN: [1yB+BIcnUZ5P+U+FthfD8eTBk6JmEKjUgYAijjrxgj18NZ391jr0A/W6Q2X+y8NW] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 97cfd162-03bc-4aa5-25db-08d7e848b415 X-MS-TrafficTypeDiagnostic: AM6EUR05HT241: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l6ozoF35bXkSmrXAA4Lrvag/XyXUQBshHHL2fzGzyk+bGS8DrElJ9jd4ClnUS/q89Hb4kDUGzwPfGrKnRHAa0GSYJEIr5C9ZXZ/c1e8/Ch/qPUuJjICZB9ndD/Q4YAh7WYvlld5rcr78DhvS8+5WOze5AZk6ei9+md7VPclFV7y9w8uIXDan2c9SV5VLKDQJw5pe3WKQcki+fEt4Ad7F9lAiVrxUlrSYJ5fzLt6pzf9BxmOfKwR0xyhnaMUyo5Vi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR02MB4703.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: 2CHm+ykO2NOqDP712L+lDRXGSJum4S/9/abLFyLsbn8gw22cJ7wtRVyn+7+7xhRpG/Sw/6yt61e2TukPmKxWwI/yFPy1mSmFR/TNVEIQyJ3BkES6V/Lvf/xHZrMwfZiRrf9e78qg6Zb4H0AiJSoLVD5ylZVvInctmfCak5v277mPYo5fVp5eW1/5j2RdGCNp/xUmU8UWh0FgLfCjUFgJ1Q== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97cfd162-03bc-4aa5-25db-08d7e848b415 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 12:12:07.9073 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT241 Subject: Re: [PHP-DEV] [RFC] Mixed type From: bobwei9@hotmail.com (Bob Weinand) Hey Dan, this, I consider one of the few concepts which should never make it into PH= P. In particular, the main problem with mixed is that it is a very easy "I hav= e no idea how to type that properly, so just let's use mixed". And really, in general, except for some debug functions, mixed is just an e= xcuse to not use proper generics. I cannot think of non-debug scenarios whe= re we are juggling truly unknown types where the type is unidirectional. (Uni-directional means: there is no corresponding getting/forwarding functi= on for an input.) Mixed is in almost every case just patching the holes in PHPs type system. = And as such, I'd rather promote RFCs trying to properly fix the gaps in the= type system than supporting mixed. Mixed is a hack, do not use mixed. Bob P.s.: If you want to migrate your types and have an overview of what's alre= ady migrated, maybe just add a comment // type-migrated before or similar? = But that's seriously not the business of the language. > Am 20.04.2020 um 13:17 schrieb Dan Ackroyd : >=20 > Hi Internals, >=20 > 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. >=20 > Part of the motivation for pursuing this RFC was my recent experience > in upgrading an application to PHP 7.4. >=20 > 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. >=20 > cheers > Dan > Ack >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20