Re: RFC - MACRO
| From: | Mathias Grimm | Date: | Thu, 23 Dec 2010 01:07:51 +0000 |
| Subject: | Re: RFC - MACRO | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51129@lists.php.net to get a copy of this message | ||
there are particupal points to aply a macro, like $_GLOBALS,like eval...
particular reasons.
zend engine and php internals are macro-oriented programing...
you can define a pattern(prefix,sufix,etc...) to ensure the purpose of
macros, avoiding doubts..
RET_IF_ERR is a clean macro..
MACRO_1 is a very perl-read-only-macro..
doValidations() is a clean method.
process() is a poor description method... and so on..
On Wed, Dec 22, 2010 at 10:57 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt>wrote:
> On Thu, 23 Dec 2010 00:48:44 -0000, Mathias Grimm <mathiasgrimm@gmail.com>
> wrote:
>
> On Wed, Dec 22, 2010 at 7:47 PM, James Butler <
>> james.butler@edigitalresearch.com> wrote:
>>
>> i could replace with a macro:
>> MACRO("HND_ERR","if ($obError->hasError()) { return $obError;)")
>> $obError = $object->fetch($params,$transaction);
>> HND_ERR
>>
>
> So, not only do you want macros, you want to write flow control macros...
>
>
> http://blogs.msdn.com/b/oldnewthing/archive/2005/01/06/347666.aspx
>
> --
> Gustavo Lopes
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>