Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108555 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 23987 invoked from network); 14 Feb 2020 02:10:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Feb 2020 02:10:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9AE5E1801FD for ; Thu, 13 Feb 2020 16:24:36 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 13 Feb 2020 16:24:35 -0800 (PST) Received: by mail-wr1-f43.google.com with SMTP id z7so8918073wrl.13 for ; Thu, 13 Feb 2020 16:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:cc:from:message-id; bh=6GNpnBKzGqk9ekKV0cQPsxJn5zjJPlNCHIF6KTW0o9M=; b=kZcIip3OnGDDHiUJEsd0GDtfNaYpF+eXMd7x3xq587+Q36wwEhhPwwjbS8A/tCHs9d c/GYtf7BBkaj/IdFvS6ea3phNEhra4VIbJCBojXG20Aqf1jKBlqZltB6gjg1BhMg6opr mhtDIvCogoVPacEVbADECCFyFy8qA/5XjQE37gmEOqRzCc9TSLdBldaipDx5uX2zMyGK fTplFoM89OUHt9ciKgdUivqXt1VAlAX9a9Z1Zqgyl1bwpSIj7EICzTPXJrRK9sWXNzHn UlmyrSUDC7xc0zBshD8Lepiyf//uao8Y/EZrBzB71mkPo334OoMIZa2QCGQbivghfr6+ BMHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:cc:from:message-id; bh=6GNpnBKzGqk9ekKV0cQPsxJn5zjJPlNCHIF6KTW0o9M=; b=TJEjJzPwQne9yvwC+QlE2uIkbi5SrUkLCPUklaSEoOAgsM1pZcPh+weDYudv6sx6XV c3SLc9d693DpVW5LHeARCYM8jiBl6G7/d3R0H2wuSzN96/Fc36JFIhTGPiLso2C1+KOL eiAOdkPPaD067tB4rMwnLvfkSe9+S/vO92IvCI02fhBBjxsIdIG8SZ2rjTi0Y8NBfslZ yYGHcNALRmPi44o03GAv4axA3dspQDvSIbnYEtfY6JNde4FBu0/Hfsw2QWF3Q4WgjSj0 BD+BN3nO1UPNLyevglGpvfnH5LvMTnITSFPydEUOxkUEtmd6tFoLE5OuXeT23ctB1/24 CH+A== X-Gm-Message-State: APjAAAWUSHxPLy0vkpVyr/ZQGWbzI53AHm+9PPR2td0VMQDE1lnkePt5 RGHyCxh7vZ0QxM4tgFu9Tt7/rQN5 X-Google-Smtp-Source: APXvYqx/XpsbphssuGBU8JSbHtR2dThMdN+3Ptyrbr7GG7MFD1dMwB6fECTiBRpi1UXoqBCooPl93w== X-Received: by 2002:adf:e550:: with SMTP id z16mr124906wrm.5.1581639873537; Thu, 13 Feb 2020 16:24:33 -0800 (PST) Received: from [192.168.0.12] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.gmail.com with ESMTPSA id e1sm4897284wrt.84.2020.02.13.16.24.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 16:24:32 -0800 (PST) Date: Fri, 14 Feb 2020 00:24:30 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <2C404984-AD76-4CDF-8E1A-04DF8EF024DD@newclarity.net> References: <10FCCCED-B8AE-4394-91B3-0FEB448E2398@gmail.com> <2C404984-AD76-4CDF-8E1A-04DF8EF024DD@newclarity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable CC: PHP internals Message-ID: <0BE8FC1E-A9BF-4A2A-9CA5-59BEE1245632@gmail.com> Subject: Re: [PHP-DEV] [RFC] From: rowan.collins@gmail.com (Rowan Tommins) On 13 February 2020 18:19:08 GMT+00:00, Mike Schinkel wrote: >Eloquently maybe, but of limited vision=2E I think that's a rather negative way of putting it; there was a request fo= r use cases, and you have supplied some, so thank you=2E :) An idea I had earlier which might solve some of them is if what was return= ed was not a normal Closure instance, but a new class like FunctionReferenc= e=2E It could then "remember" the name of the function wrapped, and impleme= nt __toString, Serializable, etc=2E It could inherit from Closure, so insta= nceof checks would work, and bindTo would return a normal Closure=2E I'm su= re there's downsides I haven't thought of yet, but I thought I'd throw the = idea into the mix=2E A possible future direction would then be to have ::class return some kind= of ClassRef object, with the obvious downside that it would no longer pass= string type hints without casting=2E I'm also not sure what the object wou= ld do, other than feel nicer from a type system point of view=2E Regards, --=20 Rowan Tommins [IMSoP]