Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51131 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24595 invoked from network); 23 Dec 2010 08:06:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2010 08:06:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Received: from [63.205.162.117] ([63.205.162.117:43547] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/F5-04152-513031D4 for ; Thu, 23 Dec 2010 03:06:46 -0500 Received: from us-gw1.zend.com (us-ex2 [192.168.16.15]) by us-mr1.zend.com (Postfix) with ESMTP id 0BAEFC03EE; Thu, 23 Dec 2010 00:07:44 -0800 (PST) Received: from US-EX2.zend.net ([fe80::1d86:6a3c:13cc:f3a7]) by US-EX2.zend.net ([fe80::1d86:6a3c:13cc:f3a7%11]) with mapi; Thu, 23 Dec 2010 00:06:42 -0800 To: Mathias Grimm CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] RFC - MACRO Thread-Index: AQHLofuBZt+cSXTTxkmG0u22euMal5Otq5wQ Date: Thu, 23 Dec 2010 08:06:42 +0000 Message-ID: <8757232E56758B42B2EE4F9D2CA019C9D10889@US-EX2.zend.net> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] RFC - MACRO From: andi@zend.com (Andi Gutmans) > -----Original Message----- > From: Mathias Grimm [mailto:mathiasgrimm@gmail.com] > Sent: Wednesday, December 22, 2010 9:12 AM > To: internals@lists.php.net > Subject: [PHP-DEV] RFC - MACRO >=20 > I want to request a C/C++ feature that i think is good. >=20 > MACRO >=20 > MACRO('PF','private function _'); > MACRO('SCOPE_CLASS','class MyProject_'); >=20 > class UseMacro > { > PF preSave($object) > { > //... > } >=20 > } >=20 > SCOPE_CLASS Internal > { >=20 > } >=20 > I don know if there is a RFC for this feature. Although I am a C developer and use macros I think it'd be horrible to add = them to PHP (+ it's been discussed and rejected many times in the past). Macros make it very hard for a third party person to read your code + goes = directly against the verbosity spirit we've always had in the PHP project. = Forget also the fact that it creates a lot of problems with solutions such = as debuggers. I suggest if it's something you really feel you need then implement it exte= rnally to PHP as part of your build and deployment environment. There are a= variety of templating/pre-processor solutions out there including the C-co= mpiler tools themselves. Andi