Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51135 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9888 invoked from network); 26 Dec 2010 15:47:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2010 15:47:36 -0000 X-Host-Fingerprint: 65.19.76.48 unknown Date: Sun, 26 Dec 2010 10:47:34 -0500 Received: from [65.19.76.48] ([65.19.76.48:10457] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/60-33703-593671D4 for ; Sun, 26 Dec 2010 10:47:34 -0500 Message-ID: <5A.60.33703.593671D4@pb1.pair.com> To: internals@lists.php.net References: User-Agent: slrn/pre1.0.0-18 (Linux) X-Posted-By: 65.19.76.48 Subject: Re: [PHP-DEV] RFC - MACRO From: weierophinney@php.net (Matthew Weier O'Phinney) On 2010-12-25, Mathias Grimm wrote: > php 4 doesnt have namespace, it was just an example. > zend framework dont use namespecaes yet... and classe names get longer for > example. But that doesn't stop you from using PHP 5.3 and using class aliasing already (heck, I do this already, particularly in examples for webinars/conference sessions). This accomplishes the same thing (in this particular scope), using features already available in the language. > a think that macros in the framework, not in the user (programmer) > space are usefull sometimes. I'd argue the opposite. Within a framework, you want the code to be as readable as possible, so _anybody_ can pick it up and help maintain it. That often means a certain level of verbosity, to ensure developers know *exactly* what is going on at each and every level of the code. > as i sad before.. RET_IF_ERR is very clean and anyone can understand > it. > > as well as framewrok methods need to be understand, some macros will > too > > > > > > 2010/12/24 Nicolas A. B=E9rard-Nault > >> This has been brought up countless times and has always been rejected >> (browse the archives if you aren't convinced). >> >> Anyhow, I just hope I never have to maintain code you write in this >> fashion. Pre-compilation macros are very out of character in the dynamic >> languages paradigm and I doubt they'd be useful in any case. The examples >> you gave convinced me once and for all that this is a very=B2 bad idea. >> There's a reason why no modern language uses three letters tokens for com= > mon >> statements, I'll let you guess what it is. >> >> Anyhow, merry Christmas. >> >> P.S.: SCOPE_CLASS ? Have you ever heard of namespaces ? >> >> On Wed, Dec 22, 2010 at 12:11 PM, Mathias Grimm w= > rote: >> >>> I want to request a C/C++ feature that i think is good. >>> >>> MACRO >>> >>> >> MACRO('PF','private function _'); >>> MACRO('SCOPE_CLASS','class MyProject_'); >>> >>> class UseMacro >>> { >>> PF preSave($object) >>> { >>> //... >>> } >>> >>> } >>> >>> SCOPE_CLASS Internal >>> { >>> >>> } >>> >>> I don know if there is a RFC for this feature. >>> >> >> >> >> -- >> Nicolas A. B=E9rard-Nault (nicobn@gmail.com) >> > > --00235445ba821c252204983cbac0-- -- Matthew Weier O'Phinney Project Lead | matthew@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc