Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28183 invoked from network); 29 Dec 2017 17:24:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2017 17:24:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.83 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.83 mx102.easyname.com Received: from [77.244.243.83] ([77.244.243.83:44972] helo=mx102.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/0C-47595-A5A764A5 for ; Fri, 29 Dec 2017 12:24:43 -0500 Received: from cable-81-173-133-76.netcologne.de ([81.173.133.76] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eUyOd-0008EI-6F; Fri, 29 Dec 2017 17:24:39 +0000 Reply-To: internals@lists.php.net To: "lists@rhsoft.net" , internals@lists.php.net References: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> <58A5ABDF-AA25-46D4-83E7-4DE72E3DFF5E@gmail.com> <757270790.33iDQ9MZ2V@vulcan> <52ca4e64-bb44-ba1d-4ba7-b0706915d709@rhsoft.net> Message-ID: Date: Fri, 29 Dec 2017 18:24:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <52ca4e64-bb44-ba1d-4ba7-b0706915d709@rhsoft.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Scalar Pseudo-type From: php@fleshgrinder.com (Fleshgrinder) On 12/29/2017 6:21 PM, lists@rhsoft.net wrote: > no, when i accept "int|float" i don't get something converted at all and > i can handle the cases different - when it#s silently casted to a float > i have no way to know it was a int at call time > Again, obviously, the question remains, why would you care? Please provide convincing arguments as this would become the body of the corresponding RFC. Adding that type is super simple, the question is why is it so super handy? PS: Despite union and intersection types, they automatically allow this form and I repeat that I am totally in favor of them. The question is truly about `number` only which would accept `int` and `float` (no `string`). -- Richard "Fleshgrinder" Fussenegger