Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25733 invoked from network); 8 Sep 2010 18:16:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2010 18:16:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:51630] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/75-33683-913D78C4 for ; Wed, 08 Sep 2010 14:16:58 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id BDF2480296; Wed, 8 Sep 2010 14:16:54 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp26.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 26F008022B; Wed, 8 Sep 2010 14:16:54 -0400 (EDT) Message-ID: <4C87D315.2030306@sugarcrm.com> Date: Wed, 08 Sep 2010 11:16:53 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Guilherme Blanco CC: Dmitry Stogov , Pierrick Charron , "guilhermeblanco@hotmail.com" , Zeev Suraski , PHP Internals References: <4C873C0F.1010200@zend.com> <4C879613.7090709@zend.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: PHP Annotations RFC + Patch From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! >>> [JoinTable( >>> name="users_phonenumbers", >>> joinColumns=array( >>> [JoinColumn(name="user_id", referencedColumnName="id")] >>> ), >>> inverseJoinColumns=array( >>> [JoinColumn(name="phonenumber_id", referencedColumnName="id", >>> unique=true)] >>> ) >>> )] > [Validation([Email(checkMX = true)])] I'm getting a feeling we are developing language inside language here. We rejected [] syntax for arrays because it makes the intent unclear. I'd say if that's unclear [Validation([Email(checkMX = true)])] is super-unclear - what exactly is supposed to happen there? It is very non-obvious. I think it needs to be radically simplified. I understand that people that write ORMs etc. want their work to be easier, but I don't think turning PHP into a mesh of random brackets and words worth it. If we can't find a model that is easy to comprehend, ORMs would have to use XML or other outside-of-syntax means. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227