Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108953 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16478 invoked from network); 10 Mar 2020 16:43:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Mar 2020 16:43:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7668A180563 for ; Tue, 10 Mar 2020 08:04: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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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-yw1-f46.google.com (mail-yw1-f46.google.com [209.85.161.46]) (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:04:29 -0700 (PDT) Received: by mail-yw1-f46.google.com with SMTP id d206so13854649ywa.12 for ; Tue, 10 Mar 2020 08:04:29 -0700 (PDT) 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=XQc2LEUetFPJv4Q9qp9dzZ8/dNPQtiRZY8uOWbZvDUI=; b=gq0UO/xrleEgVXR2WDm/iXMxF/ByYFubevf0nijyBMBaUWD7wfa6MTQVQRpfaIrXvv f7ALjV5TsqUzdU7Jgg7CybEwjii7G97nZTOKpOB5HCKhJUuIbUyFpO0YueVi7JVWn1N7 gAgOSQn5MozqyO36RsJzxkDcxQ6fpZ6RocCuKLK3+C6sByVbAJQXbm/TVjmtT30g5Owx GfIWDAtJY5LG4Ocvrkg7SbBNPX6W4w1HfHXS2NTo/cdraJFeJ6imTUmc1HwXwo9UCyMD P2FweHTquEtd0MRiY6vUWtbmfWjY2iZ0N1JuEdTn2Wsuuek7Fl4RpjTHe3dbEHF7IM6g +iJQ== 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=XQc2LEUetFPJv4Q9qp9dzZ8/dNPQtiRZY8uOWbZvDUI=; b=TI+0DM3eXLtBBZepWfIh0qZx0A22A666E43AaoZIM90nc4Gk/ChXNFY8vw2lDEAOpQ ihWGIqWnvNKNk3Pv07LA62g097PnKPFXEiYPiUcs7B7eoY4QQ3YUSFFeCVdX/6ESV0z8 7ToqdbCKnTFgsryIGdu8gve5/5fJP3eRZygrigc1+mFhs60UXPGCM2Hd/kmyWfCC5967 gRglITMHtdVPdq0HEZCu5kxpxffqXUj/IEkbB6fxY0T54t67gRzoUkyWo9Zyux88AY/G hiJ2mSpCv8mvT4vnTvL6hf6PqBBXa2/7BLTPXRgJGREuxJgCRLVu4IlhU/Mt0kewGfB7 50/Q== X-Gm-Message-State: ANhLgQ3/5rzOBxqF/w6Ua+Fkxb6AWkIhUn5Aos+A9dJEtZLQAJwhqBS5 kpUCIrxi3CexjUXE1B1/0kuJuQ== X-Google-Smtp-Source: ADFU+vvCZnTucyzgfQIPgqtTI2hQ75J0d0bmQs013SSZSkdmUzBg0NW/9CugDZNpuyoJz8abS9NQHA== X-Received: by 2002:a81:6cc5:: with SMTP id h188mr22570044ywc.172.1583852668089; Tue, 10 Mar 2020 08:04:28 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:8dba:c229:7c5e:3d05? ([2601:c0:c680:5cc0:8dba:c229:7c5e:3d05]) by smtp.gmail.com with ESMTPSA id l191sm19858006ywb.12.2020.03.10.08.04.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2020 08:04:27 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Tue, 10 Mar 2020 11:04:23 -0400 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <854D29ED-C2EA-4201-87EB-CE561F630F37@newclarity.net> References: <2227A758-3035-4A43-974C-C4461A096DFB@newclarity.net> To: Aleksander Machniak X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Attributes v2 From: mike@newclarity.net (Mike Schinkel) > On Mar 10, 2020, at 7:53 AM, Aleksander Machniak wrote: >=20 > On 10.03.2020 12:43, Mike Schinkel wrote: >>>> Alternately, why not use this (which is probably the best option = IMO)?: >>>>=20 >>>> function foo() attributes >>>> SingleArgument("Hello"), >>>> Another\SingleArgument("World"), >>>> \My\Attributes\FewArguments("foo", "bar") {} >>>>=20 >>>=20 >>> This particular example leads to complications with how different = keywords >>> stack up; would the return statement come before the "attributes" = keyword? >>=20 >> How does the return statement affect this example? The return = statement would be inside the braces, the attributes would be before the = braces. >=20 > 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. =20 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=20 extends Parent=20 implements Interface1, Interface2, Interface2=20 attributes Attribute1, Attribute2, Attribute3 {} -Mike=