Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3992 invoked from network); 24 Apr 2016 12:07:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2016 12:07:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 207.46.100.107 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 207.46.100.107 mail-by2on0107.outbound.protection.outlook.com Received: from [207.46.100.107] ([207.46.100.107:45712] helo=na01-by2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/03-21220-9E6BC175 for ; Sun, 24 Apr 2016 08:07:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1BZKeBgBx9+XeGiUK38Y7N1yo+NPxpxp+S4BiChsfj4=; b=EF1q6wQeLxKzYSXoks/RpEuM8SZ8vGZgQ/s3Zg6otpZDjf7FOsHqJKvIxiL2IJzvXCMvMOEqiZTa4L0bQJbU8rqcl0irgi00+9nUZxGe+4m9/VJUUMphKxY13S44uHG9Jmqim6Yy+PjKBf2ua2nFGQA/rr3jx941jd/lvbJYxMI= Received: from BY2PR02MB298.namprd02.prod.outlook.com (10.141.140.21) by BY2PR02MB298.namprd02.prod.outlook.com (10.141.140.21) with Microsoft SMTP Server (TLS) id 15.1.466.19; Sun, 24 Apr 2016 12:07:01 +0000 Received: from BY2PR02MB298.namprd02.prod.outlook.com ([10.141.140.21]) by BY2PR02MB298.namprd02.prod.outlook.com ([10.141.140.21]) with mapi id 15.01.0466.024; Sun, 24 Apr 2016 12:07:01 +0000 To: Fleshgrinder CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] PHP Attributes Thread-Index: AQHRnBAun0yJJJCyoUaLowSO4sZVN5+Y2wOAgAAdNQCAAA4qgIAAAJZg Date: Sun, 24 Apr 2016 12:07:01 +0000 Message-ID: References: <571C8E3B.3010105@php.net> <571CB29D.8040208@fleshgrinder.com> In-Reply-To: <571CB29D.8040208@fleshgrinder.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: fleshgrinder.com; dkim=none (message not signed) header.d=none;fleshgrinder.com; dmarc=none action=none header.from=zend.com; x-originating-ip: [212.199.177.67] x-ms-office365-filtering-correlation-id: d22f35df-4434-4606-8821-08d36c38f16a x-microsoft-exchange-diagnostics: 1;BY2PR02MB298;5:AZDuIWN0uxAshMpCSvZqx1m6EIQquvJHEQyVCdYXNYRkGhu+Q1TfczUUwag+Vb8xbyaUVL/MXmgin/IdEnRloRDPrg2gvymM6qewrQribBU4bMrWYEXe2/uj/FuuqfGZb6YXjA4tP1jcb32uxanRkuBJh0exzAjTE841AVKmSJfXR5wA6WJpDNw+YwYAmmUj;24:BEInwRBW42o6DoTD+1dRhvrgQhFL3A3LQdTWgZ/xSjkWzZyg4Gncd3HPvkK1r97pyhFPb60A1k08K/yv61MT3theXT9ge+lTar/DJBV/C7M=;7:GT6hNSfqVN9YEskmbkP0zInJ838HPGMl9sGpxr4A3YlHNwjuaAdogXQFIoqOWUFFuGfPqTobEpby6b4i0oZ3cXJ6QCpaUQ7yrykRVwEqkd7HmysQQvOo94JCxF5zbnG4doj2ACPL91qlG04LtqGMPncZlm1bH9u0p2Y+CB/Xb7+rbERkBb+eepKFIyHAqonrnm4Ydqw08Ya2Kx+Tz1gvBJKmg0r/KWjtnX1BhdtqQX0= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB298; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521062)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2PR02MB298;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB298; x-forefront-prvs: 09222B39F5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(13464003)(51914003)(24454002)(377454003)(11100500001)(106116001)(10400500002)(5008740100001)(189998001)(5003600100002)(87936001)(5002640100001)(99286002)(92566002)(110136002)(122556002)(93886004)(66066001)(74316001)(2900100001)(54356999)(76176999)(50986999)(33656002)(86362001)(5004730100002)(2950100001)(77096005)(15975445007)(2906002)(3660700001)(586003)(3280700002)(102836003)(6116002)(3846002)(81166005)(9686002)(19580405001)(1220700001)(1096002)(76576001)(19580395003)(4326007)(556444002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR02MB298;H:BY2PR02MB298.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2016 12:07:01.0818 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB298 Subject: RE: [PHP-DEV] [RFC] PHP Attributes From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Fleshgrinder [mailto:php@fleshgrinder.com] > Sent: Sunday, April 24, 2016 2:49 PM > To: Zeev Suraski ; Sebastian Bergmann > > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] PHP Attributes >=20 > On 4/24/2016 1:00 PM, Zeev Suraski wrote: > > > > > >> -----Original Message----- > >> From: Sebastian Bergmann [mailto:sebastian@php.net] > >> Sent: Sunday, April 24, 2016 12:14 PM > >> To: internals@lists.php.net > >> Subject: Re: [PHP-DEV] [RFC] PHP Attributes > >> > >> On 04/21/2016 11:13 PM, Dmitry Stogov wrote: > >>> I would like to present an RFC proposing support for native annotatio= n. > >> > >> Dmitry, > >> > >> please use "annotation" as the name for this feature and not "attribut= e". > >> > >> We already have attributes: it's what we use to store data in > >> objects. And while some people call them "member variables" or > >> "properties" the correct term for them (AFAIK) is "attribute". > > > > I don't think I've ever heard properties referred to as attributes in t= he > context of PHP. The PHP manual defines them and refers to them throughou= t > as 'properties'. > > > > (I'm not voicing an opinion on attributes vs. annotations; Just pointi= ng out > that data storage inside objects isn't named attributes). > > > > Zeev > > >=20 > The terminology here is pretty clear and you can just look it up, it has = nothing > to do with PHP or Java or whatever. The main problem is simply that peopl= e > do not know the terminology and get mixed up. That is usually okay in a > casual discussion where each peer understands what the other is referring= to. > However, we are dealing with language specification here and need to be v= ery > exact or we fuck it up for the users. >=20 > `$x` is a property in the following example: >=20 > class A { > $x; > } >=20 > https://en.wikipedia.org/wiki/Property_%28programming%29 Richard, Thanks for the programming 101 lesson :) I pointed out to Sebastian, who suggested that 'attributes' are equivalent = to 'member variables' or 'properties', that they're very consistently refer= red to in PHP as 'properties' and that I'm not aware that they were ever re= ferred to as 'attributes'. Nothing in your links suggested otherwise, arguably the opposite. Accordin= g to https://en.wikipedia.org/wiki/Attribute_(computing), "An attribute is = frequently and generally a property of a property", and while "the term att= ribute can and is often treated as equivalent to a property depending on th= e technology being discussed", when the technology in question is PHP, this= is not the case. Of course, member visibility modifiers and access modifiers (public/protect= ed/private, static, etc.) are a different thing. Saying member variables a= re referred to as attributes (incorrect in the context of PHP, AFAIK) is ve= ry different from saying these modifiers are referred to as attributes (cor= rect and sensible). Last, we're absolutely allowed to have our own definitions of terms as long= as they're sensible. Both attributes and annotations are sensible here, a= nd the fact there may be languages that treat attributes as equivalent to p= roperties isn't a strong reason against using that term for something sensi= ble, that is different from these other languages, in PHP. Zeev