At 10:16 AM 11/10/2002 -0800, you wrote:
>You don't compare them to anything. You don't need to. They are
>*already* boolean. You say:
>
> <cfif someBooleanExpression>
>
>You shouldn't say:
>
> <cfif someBooleanExpression eq true>
>
>You say:
>
> <cfif not someBooleanExpression>
>
>You shouldn't say:
>
> <cfif someBooleanExpression eq false>
>or
> <cfif someBooleanExpression neq true>
I want say that I find the second syntax more readable and
self-documenting. If someone is using true Booleans, I fail to see why it
matters. Using Integers as Booleans, on the other hand, just seems like a
bad practice to me. I do see it often enough, such as checking for the
length of a string like this:
<cfif Len(MyString)>
Whatever
</cfif>
It annoys me, because I would much rather see:
<cfif (Len(MyString) is 0)>
Whatever
</cfif>
The second is much more readable, in my opinion.
--
Jeffry Houser | mailto:jeff@;farcryfly.com
DotComIt, Putting you on the web
AIM: Reboog711 | Phone: 1-203-379-0773
--
My CFMX Book:
<http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm