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 <glo...@nebm.ist.utl.pt>wrote:

> On Thu, 23 Dec 2010 00:48:44 -0000, Mathias Grimm <mathiasgr...@gmail.com>
> wrote:
>
>  On Wed, Dec 22, 2010 at 7:47 PM, James Butler <
>> james.but...@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
>
>

Reply via email to