Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8364033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:20:05+00:00 2026-06-09T12:20:05+00:00

Are there any known functional or performance differences in using yes|no vs. true|false? ColdFusion

  • 0

Are there any known functional or performance differences in using yes|no vs. true|false?
ColdFusion documentation states that values for boolean-type attributes are specified with yes/no. For example, <cfargument required=”yes|no” ….> I have used true and false in place of yes|no and have seen no unexpected functionality.

[EDIT]
I appreciate the responses, perhaps I am thinking a bit more general in this case.

ColdFusion documentation states that the expected value is ‘yes|no’ for some parameters, such as for cfargument required. Is there any insight into why yes|no is documented as the only expected values, rather than also true|false or stating ‘any boolean value’ is expected? Seems a bit ambiguous to not indicate any boolean type rather than only state ‘yes|no’ if either A)We are to assume ‘any boolean’ B)There is an actual performance difference. Thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:20:06+00:00Added an answer on June 9, 2026 at 12:20 pm

    "yes/no" is a few characters less to type.

    "true/false" (and true/false) is more in line with other programming languages.

    In terms of performance, they are all strings as far as CF is concerned. It is not until you try to use them in conditional logic that they magically change into other data types, like java.lang.Boolean. The conversion between strings and Booleans and back again is very fast. It’s what CF does most of the time. You’d be hard pressed finding any reliable tests proving one faster than the other.

    For code maintainability/readability it’s best to stick with one or the other.

    Some legacy CF tag functions specifically require “yes/no”. They simply will not work with “true/false”. I believe this is no longer the case in CF9+.

    Don’t rely on the ColdFusion documentation being accurate or up to date. Almost all of the methods that list “yes/no” as the default/allowed values actually support any kind of boolean value. “yes/no”, “true/false”, true/false, 1/0, etc.

    IMHO using “yes/no” for booleans is crazy. Backwards compatibility from the old CF5 era. Sucks that Adobe are still using it to output java Booleans.

    eg. writeDump( var: (not true) ); gives you “NO”. But, I wanted false?! Grrr.

    You can tell what java class your variable is currently by calling myVar.getClass().getName(). You can use it to watch CF casting your data from Boolean to String and back to Boolean again, like magic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any known design principles, best-practices and design patterns that one can follow
Using jquery UI 1.8's autocomplete, is there any known way to take the results
Can someone please identify the functional/performance differences, if any, between SET and SELECT in
Are there any known issues with ASP.Net Ajax and IE6 in Windows 2000 machines
Is there any known attack on this modified version of Yahalom? Cannot find anything...
Are there any known regular expressions out there to validate credit card track 1
Is there any known hashing algorithm, which for similar input returns similar output? I
I was wondering - are there any known techniques to control access to a
Is there any well-known algorithm (or obvious solution) for transforming a list from order
Hi I was wondering if there is any known way to get rid of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.