From: Evan R. <eva...@gm...> - 2006-05-11 17:34:58
|
Hey Kev (especially), I've been overwhelmed at work this week, so have had no time (but we were featured on boingboing today with our car towers!). in any case, i've been browsing through all your updates. is there a reaso= n that we are passing almost everything by reference? i remember reading somewhere that =3D& is deprecated in php5 and causes some sort of undesired side effect...but not sure of the details. /evan |
From: Kevin <ke...@dr...> - 2006-05-11 22:26:10
|
Evan Roth wrote: > Hey Kev (especially), > > I've been overwhelmed at work this week, so have had no time (but we > were featured on boingboing today with our car towers!). > > in any case, i've been browsing through all your updates. is there a > reason that we are passing almost everything by reference? i remember > reading somewhere that =& is deprecated in php5 and causes some sort > of undesired side effect...but not sure of the details. It's what I'm used to with php4. To pass by reference on a return value you have to declare it on both sides of the function/method call. I probably have gone overboard on using pass by reference. I'm used to other languages that do it exclusively by default. (java & python) In some cases I really want a reference passed around to keep the values inside the object consistent. In other cases I do it to avoid the (potentially costly) copy of an object, or collection of objects. I know, I know, that is premature optimization which is a no-no. I started using a logging function that gives very verbose output. I can now see all the places I've used either incorrect or deprecated reference passing. I'll try to clean it up. -Kevin |
From: Evan R. <eva...@gm...> - 2006-05-12 07:30:00
|
well, in the end, it shouldn't really matter. i was just worried about something breaking in php5. what are you using for logging / debugging. i'd like to install something on my side anyway. /evan On 5/12/06, Kevin <ke...@dr...> wrote: > > Evan Roth wrote: > > Hey Kev (especially), > > > > I've been overwhelmed at work this week, so have had no time (but we > > were featured on boingboing today with our car towers!). > > > > in any case, i've been browsing through all your updates. is there a > > reason that we are passing almost everything by reference? i remember > > reading somewhere that =3D& is deprecated in php5 and causes some sort > > of undesired side effect...but not sure of the details. > > It's what I'm used to with php4. To pass by reference on a return value > you have to declare it on both sides of the function/method call. I > probably have gone overboard on using pass by reference. I'm used to > other languages that do it exclusively by default. (java & python) In > some cases I really want a reference passed around to keep the values > inside the object consistent. In other cases I do it to avoid the > (potentially costly) copy of an object, or collection of objects. I > know, I know, that is premature optimization which is a no-no. > > I started using a logging function that gives very verbose output. I > can now see all the places I've used either incorrect or deprecated > reference passing. I'll try to clean it up. > > -Kevin > |
From: Kevin <ke...@dr...> - 2006-05-12 11:37:07
|
Evan Roth wrote: > well, in the end, it shouldn't really matter. i was just worried > about something breaking in php5. > > what are you using for logging / debugging. i'd like to install > something on my side anyway. A user submitted a patch. I tested it the other day and each page load gives about 2-3 terminals worth of output. http://sourceforge.net/tracker/index.php?func=detail&aid=1480427&group_id=148967&atid=778257 -Kevin |
From: Evan R. <eva...@gm...> - 2006-05-12 13:30:36
|
wow, sounds nice. i'll check it out as well then. it'd be nice to think o= f incorporating something like this into a nice robust error handling object. but...we've already got our hands full, and i dont have much time at the minute to take on too much...let me get through the next 7 days... On 5/12/06, Kevin <ke...@dr...> wrote: > > Evan Roth wrote: > > well, in the end, it shouldn't really matter. i was just worried > > about something breaking in php5. > > > > what are you using for logging / debugging. i'd like to install > > something on my side anyway. > > A user submitted a patch. I tested it the other day and each page load > gives about 2-3 terminals worth of output. > > > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1480427&grou= p_id=3D148967&atid=3D778257 > > -Kevin > |