Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125473 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id ECD301A00BD for ; Sat, 7 Sep 2024 17:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725729126; bh=m/AbPPUX26rmN+tuCr06fxkH3V732treg9ZOBsOWSGc=; h=Date:From:To:Subject:In-Reply-To:References:From; b=guRzSPUCR95bPhAQAIJjU4klV3kp8Mqz0sKC0/4IG6yxcVr2VjRNCdZ2tAIt2b6Ub NBbFGqLVYCfXozAebxS94Y+IdYc0e0pF+zBOvq3cnw1TP/5b8v12Oqjdzu2f6TwZ9f CfxOHe6FQi7bplCs9wVqxHuee9BzWzCNPuZggsLBTY9AbWqFp1lY/wXVRVSrRdJq4/ rtjYrcX+QOjW/1tFQfr3fvWzRnIf/lCBZMIQ9I3ABoLEGtybKn30VfRL2nsAZwPBdG znx8+zK/PdaB9Vn0iq2j8HY4KK5Rda090/T4orlU85gdo/4hOQkf3oOWEsDov6raeS BWmpEjPu9CVNw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5494118006D for ; Sat, 7 Sep 2024 17:12:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 7 Sep 2024 17:12:04 +0000 (UTC) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id E845911401D6 for ; Sat, 7 Sep 2024 13:10:04 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Sat, 07 Sep 2024 13:10:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1725729004; x=1725815404; bh=m/AbPPUX26rmN+tuCr06fxkH3V732treg9ZOBsOWSGc=; b= FIq1jX5ym56vq3m630r0Gl0uzwM5H/uaVl/xwjddqHIBAqvuFxGf+PrZPT0/qSXh R8dZrrJE8XEdI7PJF59OwJoR4vdFf2Xnv44l5Jp63oWdbDH2fI3+tArTBIeR1KlQ OmpX1h9rF0eCRusajYaE9UM9EVTIZ8QmudFotd0gjINgESzImT7kDo7lVYuMwZuO JNCkanPVZEbGYpe1C6BedaC08/tT1lBveoKigH2y4nvBWKwzW7mgER7dFobZULjW FDu6qiDH32yZrFJa3hZKO7OKpJq6tdpMqMbGHD57VU+XTaxURrS4FKGI3hAnGXzs 3Vs0CeshzK8tIuroJbO+Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1725729004; x= 1725815404; bh=m/AbPPUX26rmN+tuCr06fxkH3V732treg9ZOBsOWSGc=; b=a yA051Q7IVGqCWL9Ma5kFb/Ds82YWNuzDFWsLm+bBDlAt7ifAJsXd1DQ9OJpbRaWH O1MBz+PeRbWf5VYjSGvemb+GpS6htOcFEyirAR8quy0HZyUNrOjpLA41RoBz1PJa a4Nt4E5MulljiXSshUX1WBymunbySyXE6vadjPOi/EJBXHfBRA3vxml2GCwEKzPv ULtZ4ySttHmdWnQUWwrN7HJHFKYqpptlYWTkCmVsqyb9LbfTT4KyhjTSqTWHyG9L vihvf1P6ppQvc3sKZdzZM8g3Z/2bCfjI8NOjO75LDq28V0OE7J7Mq1gNP+77RgJz 9Gmjy8XlyZ43OdnYPle4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeifedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf fufggjfhfkgggtgfesthhqmhdttderjeenucfhrhhomhepfdftohifrghnucfvohhmmhhi nhhsucglkffoufhorfgnfdcuoehimhhsohhprdhphhhpsehrfigvtgdrtghordhukheqne cuggftrfgrthhtvghrnhepheelffetiefgveduteefudegtdduveeludegueegleehiefh hefgtdekveevgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdruhhkpdhnsggprhgtphhtthho pedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlih hsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 7 Sep 2024 13:10:03 -0400 (EDT) Date: Sat, 07 Sep 2024 18:07:59 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] bikeshed: Typed Aliases User-Agent: K-9 Mail for Android In-Reply-To: <667233C2-BC47-4530-8142-D90E6907FE63@daveyshafik.com> References: <0fa39535-f22d-4eba-b4df-90abe39e683a@app.fastmail.com> <79e58673-50ec-461e-a998-736b020e4287@app.fastmail.com> <928A2984-6035-4DA6-9EA7-12E85237C270@php.net> <0d461700-1b6c-44fd-9cda-aa698de49847@app.fastmail.com> <667233C2-BC47-4530-8142-D90E6907FE63@daveyshafik.com> Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 7 September 2024 17:23:13 BST, Davey Shafik wrot= e: > >My point is that if you talk about type DEFs, you now have this feature w= here you can input one type and get something that encapsulates it, and it = seems weird that enums would LOOK similar In type hint usage and function d= ifferently=2E Personally, I would prefer to go the other way: make typedefs, like enums,= something you explicitly construct / cast to, rather than something that i= mplicitly coerces any compatible value=2E=20 Like enums, I would want to use typedefs to prevent accidental mixing of v= alues (e=2Eg=2E a name where a reference number was expected, or a size in = pixels where a size in centimetres was expected)=2E That use is compromised= if every scalar value is silently accepted for any matching typedef=2E Regards, Rowan Tommins [IMSoP]