Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92690 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11531 invoked from network); 24 Apr 2016 12:55:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2016 12:55:14 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.86 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.86 mx105.easyname.com Received: from [77.244.243.86] ([77.244.243.86:51010] helo=mx207.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/94-21220-032CC175 for ; Sun, 24 Apr 2016 08:55:13 -0400 Received: from cable-81-173-133-226.netcologne.de ([81.173.133.226] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1auJZ7-00049f-Gp; Sun, 24 Apr 2016 12:55:09 +0000 Reply-To: internals@lists.php.net References: <571C8E3B.3010105@php.net> <571CB29D.8040208@fleshgrinder.com> <571CBA5D.4020905@fleshgrinder.com> To: Benjamin Eberlei , PHP Internals Cc: Zeev Suraski , Sebastian Bergmann Message-ID: <571CC222.1050205@fleshgrinder.com> Date: Sun, 24 Apr 2016 14:54:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <571CBA5D.4020905@fleshgrinder.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="K41af765dmifAoU51Obw5vr005nC4nOWN" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: php@fleshgrinder.com (Fleshgrinder) --K41af765dmifAoU51Obw5vr005nC4nOWN Content-Type: multipart/mixed; boundary="ANdXtH6hooRFmI1CF4FoLgPMSh4IXuoo7" From: Fleshgrinder Reply-To: internals@lists.php.net To: Benjamin Eberlei , PHP Internals Cc: Zeev Suraski , Sebastian Bergmann Message-ID: <571CC222.1050205@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC] PHP Attributes References: <571C8E3B.3010105@php.net> <571CB29D.8040208@fleshgrinder.com> <571CBA5D.4020905@fleshgrinder.com> In-Reply-To: <571CBA5D.4020905@fleshgrinder.com> --ANdXtH6hooRFmI1CF4FoLgPMSh4IXuoo7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Another way to illustrate what I mean: The feature will be used /to annotate/ (add metadata) and the so /annotated/ data has additional /attributes/ afterwards. Trying building the sentence if the feature is called /attributes/. @entity @invariant final class A { @inject private static $x; @test public memoized function f(){} } r =3D reflect A r.getModifiers =3D [ final ] r.getAnnotations =3D [ entity, invariant ] r.getAttributes =3D [ final, entity, invariant ] r =3D reflect A.x r.getModifiers =3D [ private, static ] r.getAnnotations =3D [ inject ] r.getAttributes =3D [ private, static, inject ] r =3D reflect A.f r.getModifiers =3D [ public, memoized ] r.getAnnotations =3D [ test ] r.getAttributes =3D [ public, memoized, test ] Note that there are programming languages that allow adding of metadata solely via annotations: Ceylon. No matter the data to annotate. Hence, in Ceylon no differentiation would be made between modifiers and annotations. However, one could check the actual annotation type to determine what it is. https://modules.ceylon-lang.org/repo/1/ceylon/language/1.2.2/module-doc/a= pi/index.html#section-annotations --=20 Richard "Fleshgrinder" Fussenegger --ANdXtH6hooRFmI1CF4FoLgPMSh4IXuoo7-- --K41af765dmifAoU51Obw5vr005nC4nOWN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXHMInAAoJEOKkKcqFPVVrGqgP/A2XiRch4xFmlbXGyKoZZNrT 6sQVV24xv+JPeQisHzOZpeT3iTrLv7Tny4XCKBsDiBoyGsPBwseFBEGfc2nByjJO aerBmpwIR2MGNyO84nsLhV9P3Pa8jNQ5aosf/3DbdrEWy/ggdhql239MUg8QIfba y5k5R2SNXesaLm0+WZkxvFLDvcslCnl7McGBeoWDFt5xY+IBu98uqGCcSmF/rZfh isU+qmTXQ/MgWyMP74DvwAJ5lAuo9dhjTiyeP6F6/3p50fYtr8P/pafxpjZORebc nWBA0yhIU8OWqlJD6VS6cKdwsXXz7izjqbcyDLVa8l4vLZWTCDEacbBzhPu3czH6 zJS1alSwGeFUVND7fup3vlwX72jfoxpW8Ts1OgtuXfiQCADjSZMHGFHNUcXPa5bH ByAiGyMPVfa6+SVeA3rzqLU3ajVo7G4eL5DQDsG4z0v/Ehh8QfgIwSI+5Lwrixm1 ZYicRMqt79Vz1tNTJhlXP4s85z1yDdJ35FnRV+VveBIKnRFoJO8TIkvcev/dyRpB vVfVGDyogqdjqCQD+wmgcr4cziLEmI/lMVMjI28xIMoJ7K7rfafkU+XzQz+q/hGW nJ8BRqpfdn5EwiP2L19eb6oZb7SQZY7alyAKNEP5zoHQHXBa6VWhhNpa5Tq+pgbF iFuZ5S3FTYkPlKNLloYp =NXnf -----END PGP SIGNATURE----- --K41af765dmifAoU51Obw5vr005nC4nOWN--