Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92689 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9542 invoked from network); 24 Apr 2016 12:33:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2016 12:33:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.164 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.164 mx208.easyname.com Received: from [212.232.25.164] ([212.232.25.164:43128] helo=mx208.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/34-21220-A2DBC175 for ; Sun, 24 Apr 2016 08:33:47 -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 1auJEN-00004u-Jw; Sun, 24 Apr 2016 12:33:43 +0000 Reply-To: internals@lists.php.net References: <571BA0F0.2030400@fleshgrinder.com> <571C82A7.2060706@fleshgrinder.com> <571CB44C.1000704@fleshgrinder.com> To: Benjamin Eberlei , PHP Internals Cc: Sara Golemon , "dmitry@zend.com >> Dmitry Stogov" Message-ID: <571CBD1E.7020103@fleshgrinder.com> Date: Sun, 24 Apr 2016 14:33:34 +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: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KGlrDNsdABOMQcDptfP7d4OSEfI8cvf7U" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: php@fleshgrinder.com (Fleshgrinder) --KGlrDNsdABOMQcDptfP7d4OSEfI8cvf7U Content-Type: multipart/mixed; boundary="NVAdUOMh9DaksAxtbR1TB27xkHODou8gD" From: Fleshgrinder Reply-To: internals@lists.php.net To: Benjamin Eberlei , PHP Internals Cc: Sara Golemon , "dmitry@zend.com >> Dmitry Stogov" Message-ID: <571CBD1E.7020103@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC] PHP Attributes References: <571BA0F0.2030400@fleshgrinder.com> <571C82A7.2060706@fleshgrinder.com> <571CB44C.1000704@fleshgrinder.com> In-Reply-To: --NVAdUOMh9DaksAxtbR1TB27xkHODou8gD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I am not arguing against the RFC nor the feature itself, on the contrary, I like it. I just do not like certain aspects and design decisions of it; that is all. Configuration and AOP are the best usecases for annotations and those should be stressed in the RFC. They are not mentioned at all! Another usecase that I am missing completely is the usage of it for documentation and static code analysis. I already mentioned the /throws/ annotation, this could help e.g. IDEs to warn you better about uncatched exceptions form methods you call. DbC is a possible usecase but better implemented at language level. The RFC could mention the possibility of it. However, right now it is the sole usecase beside the not very PHP applicable `<>` and `<>` examples. You see, this is more a problem of the RFC text and not of the feature. ;= ) Another think I complained about is the proposed syntax because it makes annotations look like function calls, which they simply are not and will not be. The syntax is misleading and a possible built-in functionality of reactive annotations (not saying we need them) at the language level for userland is blocked. I know I just repeated myself. The extension you mentioned works just fine without the brackets. @invariant CONDITION; class A { @ensure CONDITION; @require CONDITION; function f(){} } --=20 Richard "Fleshgrinder" Fussenegger --NVAdUOMh9DaksAxtbR1TB27xkHODou8gD-- --KGlrDNsdABOMQcDptfP7d4OSEfI8cvf7U 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 iQIcBAEBCAAGBQJXHL0iAAoJEOKkKcqFPVVrJWMQAI0O/ZG8dXcnV01542I4m6aS 5diA7hFPkJ6ltnJ5sTuXf79+67jOKb6HBW10aDAq969St8xGkG6MZCBX2sZPUNJe QvRwgIko0eJr/X5sC0qeYH/Xi1F1bToCM8ID+QN10Wi9FR82BF0b741mTX1sXrrl LKdgJfUudYazf9kZVIu0MMkRyu8Pz9o0OYjWMMgbGt9U47XoXYvqkUzswgyK68ju U/8sjd+nCzQcfqKJn/L+HofF79f11z9s5kVxAQ87izqxxMnkfHjfrwqVUEaPCiAb o6i+EA1kUjqg/MkYM3CKW4O1p6YDn2JTxhDgGQSZ7e6Zs22JO3jrHUIUQatqLt05 mcqVVJKdA7rVHD07c0i4ITVnK1KidKoUvVmWPmGXJsaU0LtVUg5D123yzcL6OYy4 NkoYIl5575VE0AowEKjqqS/dss1ZG6bN371fCsW+aIv8ruwWKvGQOET5aGgxVhfg yWgI5F+v58DNQFLRb/mk7iW7QCe/OdCAS6XQnYFDINzgpJj3HUhRNsw4E2CK8Z63 ZiIHlspt+CMCa7XD0jPfLEUoTJE5tnCsndtnSzI4ua0dayAvu0XUoh1aLtnMN2mW bSu8aHC96d8lmhUNakVTvGdJUx9IkIuGjuYfhg7uqhea9j5eEuGky6FzL8snZmYk M5MAI5MtoTIPI9uShE94 =O2zQ -----END PGP SIGNATURE----- --KGlrDNsdABOMQcDptfP7d4OSEfI8cvf7U--