Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61971 invoked from network); 11 Mar 2017 13:57:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2017 13:57:40 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:60568] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/12-38004-25204C85 for ; Sat, 11 Mar 2017 08:57:39 -0500 Received: from cable-81-173-135-7.netcologne.de ([81.173.135.7] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cmhWZ-0006Eu-0V; Sat, 11 Mar 2017 13:57:35 +0000 Reply-To: internals@lists.php.net References: <24efb0e7-b0e3-68ed-5f42-2d5481f8f291@gmail.com> <44add374-6c4b-399a-c542-8d7f100dfaa3@fleshgrinder.com> <2AB030D8-9677-4E0E-8215-07D77910E51B@gmail.com> <6BDFA788-B52E-42BE-8794-50959D3A81BE@gmail.com> To: Andrey Andreev , Rowan Collins Cc: "internals@lists.php.net" Message-ID: Date: Sat, 11 Mar 2017 14:57:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString() From: php@fleshgrinder.com (Fleshgrinder) On 3/11/2017 2:53 PM, Andrey Andreev wrote: > I don't disagree with that in general, but strictly rejecting strings > and other non-integer values would alleviate the problem for a > majority of cases; i.e. would solve the 90% problem. > > What I strongly disagree on is that I should be happy with coercion, > and the almost religious resistance against (non-overridable) strict > scalar typing. > From whom? Where are you getting this from? We are all in favor of adding more types to the runtime to solve more use cases. We are all just concluding that a stringable type should not be constrained to string + object::__toString only. All your examples just help to make it more clear that there is no benefit in doing anything other than that. -- Richard "Fleshgrinder" Fussenegger