Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101435 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3190 invoked from network); 29 Dec 2017 12:56:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2017 12:56:14 -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:43950] helo=mx102.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/58-47595-B6B364A5 for ; Fri, 29 Dec 2017 07:56:12 -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 1eUuCm-0002pS-Bm; Fri, 29 Dec 2017 12:56:08 +0000 Reply-To: internals@lists.php.net To: Rowan Collins , internals@lists.php.net References: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> <58A5ABDF-AA25-46D4-83E7-4DE72E3DFF5E@gmail.com> <757270790.33iDQ9MZ2V@vulcan> <737D892F-BF1C-4A6E-9833-BEF050C78274@gmail.com> Message-ID: Date: Fri, 29 Dec 2017 13:56:01 +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: <737D892F-BF1C-4A6E-9833-BEF050C78274@gmail.com> Content-Type: text/plain; charset=utf-8 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 1:26 PM, Rowan Collins wrote: > On 29 December 2017 12:08:16 GMT+00:00, Fleshgrinder > wrote: >> What is the use case for `int|float`? I mean, if f is able to >> process a `float` than f is able to process an `int` and since >> `int` is already automatically changed to a `float`, well, you're >> done. > > I think it is somewhat tedious if we discuss every possible pair of > types, just as it would be somewhat messy if we added a new keyword > for every combination we found a use case for. The beauty of a > general-purpose syntax is precisely that a user can use whatever > combination they need, and not use combinations they don't need. I'm > sure there are plenty of nonsensical or redundant checks that can be > expressed in other parts of the language, but that doesn't mean those > language constructs are useless or damaging. > > Regards, > I agree and I do not intend to do so, I actually am not even questioning the usefulness of union and intersection types. I am more curious in regards to providing a `number` type. Seems useless to me. -- Richard "Fleshgrinder" Fussenegger