Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49716 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16559 invoked from network); 16 Sep 2010 17:49:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2010 17:49:58 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; 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:48198] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/37-15036-5C8529C4 for ; Thu, 16 Sep 2010 13:49:57 -0400 Received: from relay16.relay.dfw.mlsrvr.com (localhost [127.0.0.1]) by relay16.relay.dfw.mlsrvr.com (SMTP Server) with ESMTP id C6E5015078; Thu, 16 Sep 2010 13:49:54 -0400 (EDT) Received: by relay16.relay.dfw.mlsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8006C10378; Thu, 16 Sep 2010 13:49:54 -0400 (EDT) Message-ID: <4C9258C1.9080207@sugarcrm.com> Date: Thu, 16 Sep 2010 10:49:53 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Jussi Vaihia CC: "internals@lists.php.net" References: <39505F13-655A-43AF-941E-77750B7F7201@gmail.com> <4C8FC695.2060800@sugarcrm.com> <4C8FD72B.1070108@sugarcrm.com> <4C906333.4030204@sugarcrm.com> <7.0.1.0.2.20100915085504.17eab4d8@zend.com> <12617cf66ae07d7a2fd79a293ed69b85@beberlei.de> <4C9095D5.1050206@toolpark.com> <000001cb5511$467949f0$d36bddd0$@com> <64b4e95cac44ee297a12601d26a5453c@localhost> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Could PHP as a language be kept "pure" by first implementing python > decorators*, then implement annotations using a purpose-built > decorator? No, we can't have python decorators because unlike Python PHP functions and classes aren't first-class objects. In Python, this: @dec2 @dec1 def func(arg1, arg2, ...): pass means this: def func(arg1, arg2, ...): pass func = dec2(dec1(func)) However, you can't write equivalent code in PHP. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227