Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110813 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96616 invoked from network); 2 Jul 2020 11:37:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jul 2020 11:37:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1164B1804DA for ; Thu, 2 Jul 2020 03:26:30 -0700 (PDT) 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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) (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, 2 Jul 2020 03:26:29 -0700 (PDT) Received: by mail-vk1-f172.google.com with SMTP id r7so6182911vkf.0 for ; Thu, 02 Jul 2020 03:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+0zWC9jtaKmbocgeQRqqwumTJ8hoUoQ8qRt/Rkt9PLA=; b=VvO0JC5RksMHq8lnUPT/2qerh9sJNDuzePa+nwrpg2rLg1RU2G4UTVvpP1wAwfufIP Qu8zBlQDSpCbbz8pIF30XFNLvDFZCJ4YnpWebygPq0+fzCjlEBD4UV79sOhYV54yHl/1 U+4/eQ1SHdxr2PM0kxz4Dhd8dnqPvkHPaXitmiRJsNOVobSjAD2BhZqmdqYcePSNh+WC zMzGRpDliM3tkqxGZ69icErv+qc9LQFVvjX9bXc42uMyq6P7Hq8wUwU8BreyypyBQO+A K0UAF/1B3sVWvMja5nnv/Oo6y7nn+P2R/1TyLPHzgZdjWgva6SVCl9MoU5JYtNpAFfGP oq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+0zWC9jtaKmbocgeQRqqwumTJ8hoUoQ8qRt/Rkt9PLA=; b=b9/gWw02TOjFRJed1QXbeA05swbSola4djiiTPwhbU8xcCD3g2468+LEMtn8NqF1sv GAO1AzSPYpqZeivA/hxZkpGMu7rzVkQTpSmDupLAz+WLT3/tWOYNH1ebYrOCysqzsQP4 7SIvinan+/YyK0FH1UJkjwOcLd707xhVe09dLyLAcYSxiMBpmqZFZIud9HyrERBEpAR1 gQddJvt6BG0q85eeRn3NnFCzKSIX4k/uVVkowKfYh4arZLzSTNMhvfJMv0IDCXYTYBcV dQo6Y3XpuxlJc+gkdZqcs0jON2z2jJqlRRotqHi2YpGtw5s27nLfk7eWRXHDGzyTAHGs fiew== X-Gm-Message-State: AOAM533gU2FWyYorylTH3cfBQGasnFDf95x+1wOa7VqR+2gpvwEYq8mM GJTn8OBJfelNC+b678us0V033WSy4OPQ9OX/Pa4WR0tsvn5Evg== X-Google-Smtp-Source: ABdhPJzotMn7QR0RWlDSQo92BV8oj3RQJSu5itj9d38lSQt+vgMUoMdB8wpAYKcN4qbHqS6Ca9n3hjBwxg5Qkhm04O4= X-Received: by 2002:a1f:8c55:: with SMTP id o82mr4751453vkd.18.1593685588559; Thu, 02 Jul 2020 03:26:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 2 Jul 2020 11:26:17 +0100 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Draft RFC callable types + callable type/function autoloading From: Danack@basereality.com (Dan Ackroyd) On Wed, 1 Jul 2020 at 20:40, Larry Garfield wrote: > it would also offer a way to do effectively the same thing One use-case that would need to be covered for that would be for callables where you don't know how many parameters there would be in the callable. > duplicate functionality needlessly. Good chance it might still be nice. Not only is the syntax a little bit nicer imo: // For some class class Foo { public static function quux() { echo "I am quux"; } } // Partial version [Foo::class, 'quux'](?); // Dedicated version $(Foo, quux); As I find it easier to read, but also avoiding using strings to reference functions/classes is probably less ambiguous for both humans and computers. cheers Dan Ack