What I'm talking about is how we use this:
$foo= '4';
As opposed to this:
$foo = '4';
The reason presented for doing it this way was so that you could
explicitly search for where a variable was assigned as opposed to other
places where you might be checking for equality.
I think this is the ugliest, weirdest code convention I've ever seen.
I know of no other projects that do this, and have never used the
"benefit" that this convention would seem to provide. It seems an
anomaly among the other convention rules that require more space between
elements. It irks me to see long swaths of code lose that space as the
only "added value" in a commit.
Is there some reason why we're still doing this? Does anyone, beyond
merely thinking that it might be a good idea, actually use this feature,
or is it simply for a perceived benefit that you might use one day?
Owen
I don't use it when performing searches, but I do find it useful in situations:
1) I often do recognize the assignment when scanning code visually
2) It helps me remember that I'm assigning a variable, rather than
making a comparison.
For the latter, my finger have grown quite used to typing a second
equal sign if I type "space equal". If I exclude the space before the
equal sign, my fingers know not to add a second one.
Has anyone ever, over the course of the 1100 revisions of Habari source,used the "search for variable assignment" thing that caused us to addthat rule to the code conventions?What I'm talking about is how we use this:$foo= '4';As opposed to this:$foo = '4';The reason presented for doing it this way was so that you couldexplicitly search for where a variable was assigned as opposed to otherplaces where you might be checking for equality.
There have been 1337 revisions :)
http://www.twofishcreative.com/michael/blog/2008/02/05/skippy-makes-habari-leet