On Wed, Dec 22, 2010 at 7:47 PM, James Butler <
james.but...@edigitalresearch.com> wrote:
"What you are doing looks to be just slightly re-inventing the wheel for
very little gain. If you are copy and pasting code 'DRY violation' then you
probably need to rethink your code and/or make a new class/function of some
sort.
Unless i'm missing something?"

There are some projects (like one that im working) have more than 3.000.000
lines of O.O php coding.
Isn't it a cut and paste, but are some code that everywhere i need to
repeat, for exemplo (php4 yet)

$obError = $object->fetch($params,$transaction);
if ($obError->hasError()) { return $obError;) // this is repeated everey
processing... every method call.. like try catch..

i could replace with a macro:
MACRO("HND_ERR","if ($obError->hasError()) { return $obError;)")
$obError = $object->fetch($params,$transaction);
HND_ERR

Reply via email to