On Mon, May 26, 2008 at 6:14 AM, <catrope(a)svn.wikimedia.org> wrote:
Partial revert of r35058: when something looks stupid,
that doesn't mean it is. This is done because the function in question expects a
reference.
This is what comments are for, so people don't say "WTF is this doing"
and try to change it without understanding. :) I added one in
r35350.
On Mon, May 26, 2008 at 6:20 AM, MinuteElectron
<minuteelectron(a)googlemail.com> wrote:
Can we not modify Article::generateReason() to not
forced a reference,
since, AFAIK, you no longer have to explicitly state that a parameter
should be a reference.
That's only for objects and maybe arrays. Simple stuff like integers
are still passed by value unless specified otherwise.
You have to wonder why PHP complains when given a constant for a
pass-by-reference function, though. I guess they figure that explicit
pass-by-reference usually means that some kind of return value is
stored in the variable and they don't want people to mistakenly ignore
it, but it still seems fairly pointless to force people to manually
create a throwaway variable. Oh well. Could we give the variable a
default value, maybe, or does that not work for references?