in reply to Re: Using shift() on sort() and syntactical funniness
in thread Using shift() on sort() and syntactical funniness

While this is true, and I agree with your POV, if I'm writing something that I'm not 100% sure how it will be used in the future, I subconsciously avoid potentially expensive methods where there is a better alternative. Sure, it probably doesn't mean much in the end, but it might some day...

update: I should qualify this a bit further by saying that in cases where performance really doesn't matter with the level of usage and data I'm working with, readability and maintainability become the overriding concern, so yah I will on occasion go with a slightly less efficient method if it's significantly more readable, but generally my optimizations are almost subconscious when I'm coding. I would almost go with something in List::Util rather than sort to find a minimum, unless I were working towards a one-liner.

  • Comment on Re: Re: (ar0n) Re: Using shift() on sort() and syntactical funniness