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 1051607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:57:40+00:00 2026-05-16T16:57:40+00:00

My if stetement: if (!string.IsNullOrEmpty(Person.Name)) // some code I think the ! operator is

  • 0

My if stetement:

if (!string.IsNullOrEmpty(Person.Name))
        // some code

I think the “!” operator is less readable when writing imperative code,

Are you agree with me the following code is more readable?

if (not string.IsNullOrEmpty(Person.Name))
            // some code

I’m not talking about replace the current operators, but where’s the problem if the language accept them both ?

  • 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-16T16:57:40+00:00Added an answer on May 16, 2026 at 4:57 pm

    There are a couple of good reasons:

    • There are some fine points that the words don’t convey too well. For example, a short-circuit AND operator vs one that doesn’t short-circuit (&& vs &). VB recently(ish) introduced a short-circuit AND operator called AndAlso. That never made any sense to me. It seems to confuse people from the start.

    • Less typing. Boolean logic is used everywhere, and a couple of keystrokes saved on each expression can add up to a lot — or at least, I’ve found that having to type more is pretty annoying.

    • Because it’s what C, Java, Objective-C, and C++ programmers are used to. People have been using this syntax for 40(?)-ish years now. It lends an air of continuity to the languages that people seem to like.

    • “and”, “or”, and “not” are English words, and a syntax using glyphs like ! and &&/& is more linguistically and culturally neutral.

    • Adding more operators which mean the same thing is unnecessary for the operation of the language, and can be confusing.

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

Sidebar

Related Questions

I'm getting some very strange behaviour using the following switch statement: string recognise_mti(int mti_code)
I was looking at a piece of code I wrote in C#: if(string.IsNullOrEmpty(param1) &&
In C# I could easily write the following: string stringValue = string.IsNullOrEmpty( otherString )
I have this code in my custom MembershipProvider: public override void Initialize(string name, System.Collections.Specialized.NameValueCollection
I have the following code that takes an SQL statement (string), loads the results
If I execute the following statement: string.Compare(mun, mün, true, CultureInfo.InvariantCulture) The result is '-1',
I have the following wonderfully unreliable statement: string LastsuccessfuldownloadDateTime = 04.07.2009 19:21:36 DateTime myDate
I have the following if statement: String newStr4 = strr.split(2012)[0]; if (newStr4.startsWith(Mon)) { str4.add(newStr4);
I have the following code: using (var db = new IntDB()) { var subscription
After an incident at work where I misused String.IsNullOrEmpty with a Session variable, a

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.