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

  • SEARCH
  • Home
  • 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 7167401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:34:20+00:00 2026-05-28T14:34:20+00:00

I have a boolean variable that flags if a price (on an individual item)

  • 0

I have a boolean variable that flags if a price (on an individual item) should be displayed. I started to name it “DisplayPrice”, but that is really more descriptive of the price of the item to be displayed (think: decimal). What are some options here?

I didn’t think anything starting with “Is” was appropriate. For example, “IsDisplayPrice” seems more like meta of the price itself, where “IsPriceDisplayed” seems more like a condition than a setting.

ShouldDisplayPrice? Any ideas?

  • 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-05-28T14:34:21+00:00Added an answer on May 28, 2026 at 2:34 pm

    ShowPrice. Simple to the point.

    ShouldDisplayPrice is a suggestion. Kind of like telling the application “I think you maybe want to display it, but don’t mind me.” It tells future programmers that they are free to make up their own minds about it. I consider this a wholly dangerous situation as programmers shouldn’t be left to their own devices as they tend towards unproductive activities like forking linux or writing windows desktop apps.

    IsPriceDisplayed and IsDisplayPrice are questions that I’m not sure a data point stored in the database can actually answer. After all, the programmer might not have put the field on the screen. Setting to true in this situation may cause the universe to explode.

    Of course, you could go negative and use HidePrice instead. However, this may be confusing to the feable minded when you have logic such as “if (!HidePrice) { /*emit price */ }”

    The worst one along these lines is probably CanPriceBeHidden. It’s a suggestion, a question and a negative value. Only to be used if you are feeling particularly snarky.

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

Sidebar

Related Questions

I have an SSIS package, which depending on a boolean variable, should either go
I have a decimal variable that I would like to negate if a boolean
I have a variable that can either be boolean false , or an integer
I have a boolean variable declared at the top of a class and when
so I have a boolean type in C++ on a multiprocessor machine. The variable
I have a Boolean variable which I want to convert to a string: $res
I have a boolean variable value stored in an SQL Server database. This is
Why is that in Delphi Boolean variable initialized in global scope is false and
I have a variable in a package ( rec in this case) that needs
I had declared a Boolean variable bool abc; in a class and thought that

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.