Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108558 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30164 invoked from network); 14 Feb 2020 02:24:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Feb 2020 02:24:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E61DE1804F8 for ; Thu, 13 Feb 2020 16:39:17 -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=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, 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-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (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:39:17 -0800 (PST) Received: by mail-yb1-f170.google.com with SMTP id u26so391507ybd.3 for ; Thu, 13 Feb 2020 16:39:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o7tTw4gSu366bJ6BI72ogbAS2SbBBlK5BA8fkikvdu0=; b=xM/J4pxtb8O6li3EKKbacZ7TSGrvNfnHCkwyNG85aQp8D7YOM37dA5qbW+9hTeKcMC nyh5zoXlmj+Vw0M8yfoP5px01EAu2jekYovuQO+VUW59Jb0bYxZCuFoPoNjI6rAc2MSq y/JlDGvplilIHgRZ/xWkLi1o0Jj0bvnBaoOTSGaGbG6cqXq1eayYow0SQAFuOaHKlnXz lbzGS+a2k6hNoxMgyCT9f3bMg364GTkF2ZAG9dYiI2TtWqt5vsDktnLDnQ53ujLEYD4r EKZAAhWao7RxpyUuxKprSq0s+bu3UmZ6CWJzHUy5RL9YCt3f7CQVv7k24GWTrNK+fdFM 7xjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o7tTw4gSu366bJ6BI72ogbAS2SbBBlK5BA8fkikvdu0=; b=PK264Nv0ygKT6I2eJsG3UyjHeJmfAF16coUGE1efe1kZnye3h6uAJCsMEt/kI6oysh AHQbdaYoSKVS2EbVS216AD607T0emUMb5nbMa1JZtzAk/PP3OVpvHE2UQyDS3YOd5emo 5eh6aXFkbW0Viy+zFhrS/18IRBWggugxM4d/XrDlCjg01qobeFpG3vDrhQBmdqoC4ycj y86q4+oG5ousZQL38CMnr8n5PpRrNSFlU2E7GKNmnxWrF2q5aYyAhmgrQPJS5u9UbupP OivEvhgA21f+YM3hHAXX6NtUE8C154/gVuQRYwCIt+6oHdJO1kL7ovLdTtTLiYjgNk4u uheA== X-Gm-Message-State: APjAAAX6zJEpvsYasn0vX0Ef4Ui6U9amZ0Oc0hYQbeI8QBjfbha1NkCQ 7jVKYYj3KnW3vxQuU9ND2wBTZQ== X-Google-Smtp-Source: APXvYqxO8RwFPM5wcX+sHuM0csi3Cs6WpNZg1cMa4vf+wOeexDmEaExXHOBXeZaCrNqMRL9MMUyK4g== X-Received: by 2002:a25:553:: with SMTP id 80mr342487ybf.99.1581640757380; Thu, 13 Feb 2020 16:39:17 -0800 (PST) Received: from ?IPv6:2601:c0:c680:5cc0:c40d:6267:8a93:b5b9? ([2601:c0:c680:5cc0:c40d:6267:8a93:b5b9]) by smtp.gmail.com with ESMTPSA id a74sm1835150ywe.42.2020.02.13.16.39.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 16:39:16 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: <0BE8FC1E-A9BF-4A2A-9CA5-59BEE1245632@gmail.com> Date: Thu, 13 Feb 2020 19:39:15 -0500 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <938FDD44-1F60-4FE1-B0F1-E70284F5F2D2@newclarity.net> References: <10FCCCED-B8AE-4394-91B3-0FEB448E2398@gmail.com> <2C404984-AD76-4CDF-8E1A-04DF8EF024DD@newclarity.net> <0BE8FC1E-A9BF-4A2A-9CA5-59BEE1245632@gmail.com> To: Rowan Tommins X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] From: mike@newclarity.net (Mike Schinkel) > On Feb 13, 2020, at 7:24 PM, Rowan Tommins = wrote: >=20 > An idea I had earlier which might solve some of them is if what was = returned was not a normal Closure instance, but a new class like = FunctionReference. It could then "remember" the name of the function = wrapped, and implement __toString, Serializable, etc. It could inherit = from Closure, so instanceof checks would work, and bindTo would return a = normal Closure. I'm sure there's downsides I haven't thought of yet, but = I thought I'd throw the idea into the mix. I thought about that too, and mentioned it yesterday in a reply[1] to = you on this list. Here is the link to the Gist with the hypothetical code using such a = concept:=20 - https://gist.github.com/mikeschinkel/78684d708358e1d101e319c7a2fdef9c -Mike [1] https://www.mail-archive.com/internals@lists.php.net/msg100719.html=