Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108927 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78748 invoked from network); 9 Mar 2020 22:22:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Mar 2020 22:22:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1BE1B180088 for ; Mon, 9 Mar 2020 13:43:18 -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,HTML_MESSAGE,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-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 ; Mon, 9 Mar 2020 13:43:17 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id v11so12938272wrm.9 for ; Mon, 09 Mar 2020 13:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V9bUxaCU+ljkak8qDQsuay5INV7SK8HfbJY9Gi+BH84=; b=WIBQQo6pUKNjR21HbmbyZWFQPyCqZnp2bX2i4zpP375Kf9gwYmRHXJfAUQv4kgC3i0 OAL6u40ERYG2Q+GlpAvBjatSwYt0ULlFPm3JzvjO6bWSRZunLDe6AJa2wNXPXayyt/4m cIPoFCs5uaNVDlmDQV0GFvbNn1yj3pRqDr2R7VdcCIXxA2DX01veuyzHrcDvVSWKuqCP bdbOXLHqlxoStxR20bHWf57XHgCbUGMXI80QrNCn02PmcgaQivX1n2UYtPDoqEQvAoEr ncRtoXfLOeR5jFAxAP5kVALBmXH4sGV7gDtQbODyt4BnqGHFuCem+/3UjSPl2KVcrwrr 5Bvw== 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=V9bUxaCU+ljkak8qDQsuay5INV7SK8HfbJY9Gi+BH84=; b=ZX468OYLS8B+6E52yIPWSGQA9L6qlgfYi8YXcZ63gjNdL4RyzJj8DOI9jlF6zcP8yV dXag1DkK8Xez/gUcffEWnr77VwEg2GcVpF+QU/uxg/sSxba5VBRMGyINESR8BNaqHtnr WrjsLlc2w2JvcnNpUOHNhWVPX21SWmJQ1F0fIhg023e2yC+HqmfLZ8zGe1ZTPbVODrl8 gnKMExH0iOtQSM4vqCYJs/8kS6VBh1PKEPcWPQ9ce8RmrYK9hAHbMkjEv9VnVADmKv0p pY842TfCnQnbTUjaC5oQrpsPs/rr2l3RBdIiR1IXkC4JLB1yYqwPtLjyw48GwrQEZPYt xCgQ== X-Gm-Message-State: ANhLgQ1LmrbbsA3jiuLtSArfvU10vz6Qpf+eYjo/ddLFhK6KYkGiMgpu sRSnzdXTmfOX5S51PUR8eeZxpQiQCsViFT0XLZ4Hdg== X-Google-Smtp-Source: ADFU+vug13UoGgfKrY8afcnRlnTB6v6eXoVRkfOvtVxMkKTcuRaaPbWy3Eh0vC73Dm2OxVJc4LwYOnaZ9nUpZh0zE4o= X-Received: by 2002:a5d:4c4a:: with SMTP id n10mr23871827wrt.116.1583786595354; Mon, 09 Mar 2020 13:43:15 -0700 (PDT) MIME-Version: 1.0 References: <7BAB0436-03EC-4183-BA5A-5A165DAE806E@koalephant.com> In-Reply-To: Date: Mon, 9 Mar 2020 21:43:04 +0100 Message-ID: To: Robert Hickman Cc: Stephen Reay , PHP Internals Content-Type: multipart/alternative; boundary="0000000000006a944605a0720d68" Subject: Re: [PHP-DEV] [RFC] Attributes v2 From: kontakt@beberlei.de (Benjamin Eberlei) --0000000000006a944605a0720d68 Content-Type: text/plain; charset="UTF-8" On Mon, Mar 9, 2020 at 8:29 PM Robert Hickman wrote: > > > The RFC is at https://wiki.php.net/rfc/attributes_v2 > > > > > > A working patch is at https://github.com/beberlei/php-src/pull/2 > though > > > work around the details is still necessary. > > > > > > The RFC contains a section with common criticism and objections to > > > attributes, and I hope to have collected and responded to a good amount > > > already from previous discussions. > > > > > Why do decorator names refer to classes, rather than any callable as in > python? > Decorators in Python work differently (to my understanding) that the following function declartion @foo def bar(): At runtime becomes foo(bar()); PHPs Attributes do not become runtime behavior, instead they allow the Reflection API to access the attributes as metadata. As such declaring a callable doesn't make sense, because an attribute is not a callable, it is (meta-)data. --0000000000006a944605a0720d68--