Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30108 invoked from network); 29 Dec 2017 17:30:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2017 17:30:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:54687] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/6C-47595-8BB764A5 for ; Fri, 29 Dec 2017 12:30:33 -0500 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3z7YWl41lFzXMR for ; Fri, 29 Dec 2017 18:30:27 +0100 (CET) To: 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: <518335b8-d2f7-5b25-e85a-eff610abc299@rhsoft.net> Date: Fri, 29 Dec 2017 18:30:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Scalar Pseudo-type From: lists@rhsoft.net ("lists@rhsoft.net") Am 29.12.2017 um 18:24 schrieb 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? beause i can insert the value to a int field of a database without additional costs, because i can write faster code-paths dealing with integers which don't have all the magic problems of floats and so on > 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`) nobody needs "number" - the problem is that people downvoted the union RFC for no good reasons and "i don't see a benefit, i don't like it" are no valid reasons to do so - and to the other guy which asked why someone should up-vote for something he don't understand - nobody says that - i didn't know that voting for each and any RFC is mandatory - so just ignore it when you don#t care instead downvote