Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50237 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99155 invoked from network); 16 Nov 2010 07:43:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2010 07:43:44 -0000 Authentication-Results: pb1.pair.com header.from=will.fitch@quepasacorp.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=will.fitch@quepasacorp.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain quepasacorp.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: will.fitch@quepasacorp.com X-Host-Fingerprint: 209.85.215.42 mail-ew0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:33844] helo=mail-ew0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/50-25603-E2632EC4 for ; Tue, 16 Nov 2010 02:43:43 -0500 Received: by ewy1 with SMTP id 1so118599ewy.29 for ; Mon, 15 Nov 2010 23:43:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.33.200 with SMTP id i8mr6361607ebd.55.1289893419910; Mon, 15 Nov 2010 23:43:39 -0800 (PST) Received: by 10.213.112.130 with HTTP; Mon, 15 Nov 2010 23:43:39 -0800 (PST) In-Reply-To: <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59D7A6@il-ex2.zend.net> References: <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59B588@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59D7A6@il-ex2.zend.net> Date: Tue, 16 Nov 2010 01:43:39 -0600 Message-ID: To: Zeev Suraski Cc: "guilhermeblanco@gmail.com" , PHP internals Content-Type: multipart/alternative; boundary=0015174c1bce1784dc049526b760 Subject: Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) support discussion From: will.fitch@quepasacorp.com (Will Fitch) --0015174c1bce1784dc049526b760 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Your answer should have been just that. The overwhelming majority amongst the principal developers of PHP voiced an opinion against it. I can certainly understand the need for a meritocracy in PHP's current state. Th= e benefit of annotations for the masses vs performance hit and complexity isn't currently worth it. Saying developers needing annotations for specific functionality (e.g. SOAP= ) should make do with phpdoc sends a bad message. On Tue, Nov 16, 2010 at 1:10 AM, Zeev Suraski wrote: > I hope I won't stir the pot too much, but with all due respect to the vot= e > of at-best a two digit subset of an arbitrary 3000+ subscribers to > internals, there's an overwhelming majority amongst the principal develop= ers > of PHP that voiced an opinion against it. While we have no official rule= s > or structures for voting features into PHP, PHP being a meritocracy, that > should be enough to put this RFC to bed. > > Zeev > > > -----Original Message----- > > From: guilhermeblanco@gmail.com [mailto:guilhermeblanco@gmail.com] > > Sent: Tuesday, November 16, 2010 4:28 AM > > To: Zeev Suraski > > Cc: PHP internals > > Subject: Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) > support > > discussion > > > > @Zeev: That topic was related to an already built patch, which some whe= re > in > > favor, some against. That discussion lead to nowhere. > > So I opened a thread topic by topic for some democracy approval. As soo= n > as > > we reach some reasonable consensus, we can start another patch > > implementation based on what we end up with this thread. > > > > If result of the poll says "OK" to meta attribute, then we can discuss > next > > topic (possible implementations). > > Until then, I'd rather appreciate everyone to stick to their votes > instead of > > revamp another discussion that lead to nothing. > > > > BTW, I forgot to add my vote: > > > > +1 > > > > On Mon, Nov 15, 2010 at 8:22 PM, Zeev Suraski wrote: > > > I don't see a point in repeating the discussion we've already had on > that > > topic several weeks ago. There needs to be an overwhelmingly good reas= on > > to add a brand new syntax to the language, a whole branch of it in the > case of > > annotations - and there simply isn't. > > > > > > Zeev > > > > > >> -----Original Message----- > > >> From: guilhermeblanco@gmail.com [mailto:guilhermeblanco@gmail.com] > > >> Sent: Monday, November 15, 2010 7:08 PM > > >> To: PHP internals > > >> Subject: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) > > >> support discussion > > >> > > >> Hi folks, > > >> > > >> I'll start a series of topics (in this thread) about meta attribute > (aka. > > >> Annotations) discussion. > > >> So as soon as we agree on each topic I'll open another point to be > > discussed. > > >> Only when we reach some consensus I'll open another topic discussion= . > > >> I suggest to have a poll for each topic, so we can do some democrati= c > > >> internals decision. I'd reduce the scope of voters to only people > > >> with PHP karma. > > >> > > >> The first topic to be defined is: Does PHP need meta attribute > support? > > >> > > >> Any language is built at the top of syntax, words, semantics and > context. > > >> We cannot define it as a language if we don't have these 4 parts wel= l > > >> fit together. > > >> For a simple sentence like: I am all ears, we can easily identify > these parts. > > >> But the real meaning of this sentence (context) is only achieved wit= h > > >> another part of the language: signifier-significate. > > >> A signifier is an atomic form, material element, visible, sensitive. > > >> A significate is an idea, semantic content, conceptual element, not > > >> sensitive perceptive. > > >> > > >> This important part is only reminded when we get back to semantics, > > >> specifically when talking about idiomatic expressions, a metaphor in > > >> our sample. The meaning will only work if we have the context, a > > >> known information. Our sentence would mean that spoker person only > > >> have ears, while the true meaning is that he/she is paying attention= . > > >> A computer language doesn't differ from a language by any means. We > > >> have tokens (words), a syntax, semantic. But the lack of > > >> contextualization brings a hole on language and how your application > > >> should behave. This behavior can be achieved by many different ways; > > >> the simplest way is known as meta information. > > >> > > >> Considering you have a lack of idiomatic expressions knowledge of > > >> someone that is reading. He'd think person only have ears, but if yo= u > > >> meta notify him that it is a metaphor, he'd try to find a different > meaning. > > Example: > > >> (Metaphor) I am all ears. > > >> > > >> Now that we find how meta-information can benefit languages, it is > > >> time to understand how meta-information can benefit a computer > > language. > > >> > > >> A good example is define a Service that validates Domain Objects. > > >> Imagining a scenario where you have a User class that holds email an= d > > >> password. Email and password fields must be validated, for example, > > >> email as an email and password with at least 6 chars. A generic > > >> validation service could not have the User validation hardcoded > > >> inside the service, so the solution would be an external factor that > > >> explains to service how to validate the DO. One of the possible > > >> implementations would be a UserValidator class that contains > > >> validation rules for each field. This external factor is a good > > >> sample of meta-information. But how would a meta attribute would sol= ve > > this situation? > > >> A Service could simple retrieve the validation instructions by > > >> Reflecting the class which instance is going to be validated. > > >> Basically, to validate a Domain Object, it is simply required to add > > >> validation rules on desired attributes. Example: > > >> > > >> class User { > > >> > > >> protected $email; > > >> > > >> > > >> protected $password; > > >> } > > >> > > >> *NOTE*: Please understand that this do not enter in any > > >> implementation details. It is not time (yet) to talk baout docblock, > new > > syntax, etc. > > >> Scope now is simpler than that. > > >> > > >> Now that is possible to see how meta attribute support could benefit > > >> a language, I compiled a simple list of known projects and how can > > >> they benefit of meta support: > > >> - phpUnit Providing meta functionality for test cases, examples: > > >> @dataProvider for test data iteration, @expectedException for > > >> catching exceptions, etc. > > >> - Doctrine For Object-Relational mapping, examples: @Entity, > > >> @OneToOne, @Id, etc. > > >> - Zend Framework Server classes Used to automate mappings for > > >> XML-RPC, SOAP, etc. > > >> - FLOW3 for dependency injection and validation > > >> - Symfony2 for validation and routing rules > > >> - Others: Validation, Functional Behavior injection (which could tak= e > > >> advantage of Traits), etc. > > >> > > >> > > >> Poll will be opened for voting for 7 days (1 week) starting from now= . > > >> Poll will be closed next Monday at 5pm GMT. > > >> Question: Does PHP need meta attribute support? > > >> > > >> Happy voting! > > >> > > >> -- > > >> Guilherme Blanco > > >> Mobile: +55 (16) 9215-8480 > > >> MSN: guilhermeblanco@hotmail.com > > >> S=E3o Paulo - SP/Brazil > > >> > > >> -- > > >> PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > > visit: > > >> http://www.php.net/unsub.php > > > > > > > > > > > > > > -- > > Guilherme Blanco > > Mobile: +55 (16) 9215-8480 > > MSN: guilhermeblanco@hotmail.com > > S=E3o Paulo - SP/Brazil > --=20 Thanks, Will Fitch Director of Operations | Quepasa.com 931.205.8242 | will.fitch@quepasacorp.com Twitter: twitter.com/willfitch --0015174c1bce1784dc049526b760--