Comparisons - Your thoughts

2009-07-15 Thread Chuck Weidler
I was wondering what the community was doing with comparisons, like in a cfif. I have done it many different ways. List below are just few examples, and yes I know that the Compare() and CompareNoCase() should be used for string comparison and not numbers, but I have seen it done that way in

RE: Comparisons - Your thoughts

2009-07-15 Thread brad
it with the ECMA operators like == != etc. ~Brad Original Message Subject: Comparisons - Your thoughts From: Chuck Weidler h...@coldfusionguru.com Date: Wed, July 15, 2009 1:52 pm To: cf-talk cf-talk@houseoffusion.com I was wondering what the community was doing with comparisons

Re: Comparisons - Your thoughts

2009-07-15 Thread Jason Fisher
I have long been in the habit of using EQ and NEQ (and now moving to == and !=) for numbers in all cases, since there is no such thing as 'sort of equivalent', like there is with strings ('foo IS FOO' etc). For strings I use IS, unless case is important, and then I use CompareNoCase().

Re: Comparisons - Your thoughts

2009-07-15 Thread Eric Cobb
According to this Performance tuning for ColdFusion applications post, you should always use compare() or compareNoCase() instead of the IS NOT operator, and you should use listFindNoCase() or listFind() instead of the IS and OR operators.

Re: Comparisons - Your thoughts

2009-07-15 Thread Charlie Griefer
I'd be leery of something that says, always. Sometimes, it's OK to consider the readability/maintainability factor. On Wed, Jul 15, 2009 at 2:08 PM, Eric Cobb cft...@ecartech.com wrote: According to this Performance tuning for ColdFusion applications post, you should always use compare() or

Re: Comparisons - Your thoughts

2009-07-15 Thread Eric Cobb
While I'll agree that the readability/maintainability factor is important from a developer's viewpoint, that particular article was specifically focused on performance and was merely pointing out which functions were technically faster. If one function is built to be faster than another