|
Oh, I see your point.
Funny thing is, when I write code for myself I almost always do it the way you showed, even if the function will only be called once.
I prefer the self-documenting nature of the resultant code.
But when I post in the forums, I tend to write the shortest code rather than necessarily most efficient. Mostly because I'm lazy, I guess.
Anyway, you should have pointed out WHY you rewrote my code, to educate the poster(s). Glad you did so now.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
|