Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108955 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 25942 invoked from network); 10 Mar 2020 17:07:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Mar 2020 17:07:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8FAB11804E6 for ; Tue, 10 Mar 2020 08:28:19 -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-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 ; Tue, 10 Mar 2020 08:28:18 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id a132so1880610wme.1 for ; Tue, 10 Mar 2020 08:28:18 -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=eBvFwuGyMDBBIdqHJE9BOVur5WERoHL77IVwLD7np6E=; b=mWBaAbjJedc5gVzjnd42goCGFtgBszeBjJZ6W8iqrFsW9DqitqSLqwZ+zb550uRRoC 0LivixxthzQMBUmAtxhOUn3EfL5KNPSkzej8adDjjlgjzeKd9k4oWjEWzl+B5Amyi2vJ f7u+JWaTRmtaNF1bhd2Z853YYGcg7tI6KUIi33mX0jVgcAh1/kAj0tWq9jr64ZvJTsUa J5xo3/rae5cxhHSnpwGztk0YhaE8KjQ6T7ue0lpxPqHCFsDEChR+t/cE+pK2A1r//7an KboI0gO1JVQyq6be2SNiXJs+72unLrINP9Mw54BFAen+860hfe0xH83XPbdgPq2O4OqS cMXQ== 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=eBvFwuGyMDBBIdqHJE9BOVur5WERoHL77IVwLD7np6E=; b=cQZzhCv7poJwPZu51yQGEZxEuLMCqsKL1rNqFljgbaPmVxGI6V+XfElmkT3JjtWfep laTKMGddF0RPyvRMaHgGeyumPfQVw783VbHoYGEXIfqxLfZ3Uk8DOS+7WEUub+mheTK4 IWdX1wzWdjWMC0hV9qSvm4b+uZRjFtWqlNNrJB6WNuUezDNqSnwGQips5atgNbeyOlJ4 fUIy0uDcaCHUpu4kPQRzolNOa3K6BAqNt+k3eDoabGfXd66UXPA1urXaW9IUFBmljIBe y5njZy7K/AN1bP9SZQhQM+rgDSZoCu84Cd1jzctjBmerC9Tp4GhPQwypS+MSxcuKcm5X //uA== X-Gm-Message-State: ANhLgQ0tzb1Ntczj5QIhNUPFrv/bP3DlU7d1aFUFmF/v9z4mT8ANqDhv a8yV8MckAqfKh4Ng8R1/Op9o+OSolIVsESHwVvh7B+/IpyI= X-Google-Smtp-Source: ADFU+vsLNLWEl2FvgCwmQe/d3o6662irypkiu96JgLn0Csou0P4Iu1WgYc+OjfIJiww6/cXVzw4oRbtJzEFqbm1dvSs= X-Received: by 2002:a1c:ac8a:: with SMTP id v132mr2310527wme.64.1583854096012; Tue, 10 Mar 2020 08:28:16 -0700 (PDT) MIME-Version: 1.0 References: <2227A758-3035-4A43-974C-C4461A096DFB@newclarity.net> <854D29ED-C2EA-4201-87EB-CE561F630F37@newclarity.net> In-Reply-To: <854D29ED-C2EA-4201-87EB-CE561F630F37@newclarity.net> Date: Tue, 10 Mar 2020 16:28:04 +0100 Message-ID: To: Mike Schinkel Cc: Aleksander Machniak , PHP Internals Content-Type: multipart/alternative; boundary="000000000000c51a0605a081c4b8" Subject: Re: [PHP-DEV] [RFC] Attributes v2 From: kontakt@beberlei.de (Benjamin Eberlei) --000000000000c51a0605a081c4b8 Content-Type: text/plain; charset="UTF-8" On Tue, Mar 10, 2020 at 4:04 PM Mike Schinkel wrote: > > On Mar 10, 2020, at 7:53 AM, Aleksander Machniak wrote: > > > > On 10.03.2020 12:43, Mike Schinkel wrote: > >>>> Alternately, why not use this (which is probably the best option > IMO)?: > >>>> > >>>> function foo() attributes > >>>> SingleArgument("Hello"), > >>>> Another\SingleArgument("World"), > >>>> \My\Attributes\FewArguments("foo", "bar") {} > >>>> > >>> > >>> This particular example leads to complications with how different > keywords > >>> stack up; would the return statement come before the "attributes" > keyword? > >> > >> How does the return statement affect this example? The return > statement would be inside the braces, the attributes would be before the > braces. > > > > I think he meant return type declaration. That's why the question about > > the `use` clause is as well relevant. > > > If that is the case that makes a little more sense. > > But even so, the question is surprising because we have a well established > existing pattern with extends and implements clauses, for example: > > function foo():returntype > extends Parent > implements Interface1, Interface2, Interface2 > attributes Attribute1, Attribute2, Attribute3 {} > > Just to make sure you don't run in circles in this discussion thread here, even when syntax is not fixed yet, it's not going to be a syntax where the attributes are suffixed after the declaration. It would maybe some other characters like %[Attr]. > -Mike > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000c51a0605a081c4b8--