Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101415 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26672 invoked from network); 24 Dec 2017 17:25:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Dec 2017 17:25:37 -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.28.122 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.28.122 mx201.easyname.com Received: from [212.232.28.122] ([212.232.28.122:52713] helo=mx201.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/22-21991-F03EF3A5 for ; Sun, 24 Dec 2017 12:25:36 -0500 Received: from cable-81-173-135-181.netcologne.de ([81.173.135.181] 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 1eTA1k-0005w7-Aa; Sun, 24 Dec 2017 17:25:32 +0000 Reply-To: internals@lists.php.net To: Nikita Popov , PHP internals References: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> Message-ID: <2e0e84ed-4744-754a-6c62-c06086047b35@fleshgrinder.com> Date: Sun, 24 Dec 2017 18:25:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-DNSBL-BARRACUDACENTRAL: YES X-DNSBL-PBLSPAMHAUS: YES X-DNSBL-SPAMRATS: YES Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Scalar Pseudo-type From: php@fleshgrinder.com (Fleshgrinder) On 12/24/2017 5:42 PM, Fleshgrinder wrote: > I will extend it with some examples. > > I guess that that would be useful in weak mode. Will try to hack it in. > > I am currently also working on another RFC that adds a `Convertible` > interface with a single `into` method that has its return type set to > `scalar` where objects can opt-in to become `scalar` compatible. Even in > strict mode. The idea is that the object's `into` method is > automatically called by the engine and the receiver gets the canonical > `scalar` value that represents the object. This is specifically useful > for value objects that often represent single `scalar` values in a type > safe manner. > Added some examples but I will stop now working on anything because people already start complaining again. Contributing to PHP is like kicking a combat dog ... let's wait for some support for this feature in general first. -- Richard "Fleshgrinder" Fussenegger