Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54045 invoked from network); 22 Dec 2010 21:08:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2010 21:08:57 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 97.107.131.220 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 97.107.131.220 whisky.macvicar.net Linux 2.6 Received: from [97.107.131.220] ([97.107.131.220:54580] helo=whisky.macvicar.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/82-39212-7E8621D4 for ; Wed, 22 Dec 2010 16:08:55 -0500 Received: from [10.106.202.186] (unknown [166.205.136.212]) by whisky.macvicar.net (Postfix) with ESMTP id D7119468F6; Wed, 22 Dec 2010 16:08:50 -0500 (EST) References: <4D1254DF.9050704@sugarcrm.com> In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: Cc: Stas Malyshev , "internals@lists.php.net" X-Mailer: iPhone Mail (8C148) Date: Wed, 22 Dec 2010 13:08:44 -0800 To: Mathias Grimm Subject: Re: [PHP-DEV] RFC - MACRO From: scott@macvicar.net (Scott MacVicar) I really dislike this, what about resolving orders, then people will want un= def, then ifdef with conditions. The language doesn't need to introduce anything that makes it more complex t= o use. - Scott On 22 Dec 2010, at 11:55, Mathias Grimm wrote: > I Just want a simple replace-on-the-air to avoid spend time writing more. >=20 >=20 > On Wed, Dec 22, 2010 at 5:43 PM, Stas Malyshev wro= te: >=20 >> Hi! >>=20 >>=20 >> I want to request a C/C++ feature that i think is good. >>>=20 >>> MACRO >>>=20 >>=20 >> You know that you could write: >> > #define PF private function >> #define SCOPE_CLASS(x) class MyProject_ ## x >>=20 >>=20 >> class UseMacro >> { >> PF preSave($object) >> { >> //... >> } >>=20 >> } >>=20 >> SCOPE_CLASS(Internal) >> { >>=20 >> } >>=20 >> And then run it through CPP (gcc -Mcpp -E - - < in.php > out.php) and get= >> all the macros processed? >> -- >> Stanislav Malyshev, Software Architect >> SugarCRM: http://www.sugarcrm.com/ >> (408)454-6900 ext. 227 >>=20