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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:28:13+00:00 2026-05-12T17:28:13+00:00

Traditionally most programming languages have priority of AND higher than priority of OR so

  • 0

Traditionally most programming languages have priority of AND higher than priority of OR so that expression “a OR b AND c” is treated as “a OR (b AND c)”. Following that idea search engines and query/addressing languages (css,xpath,sql,…) used the same prioritization. Wasn’t it mistake ?

When dealing with large enough data, that prioritization is inconvenient because it makes it impossible to create reusable query context without use of parentheses. It is more convenient to create context by using AND and then union results within that context by using OR. It is even more convenient if space is used as AND operator and comma is used as OR operator.

Examples:
When searching the internet for airline tickets to bahamas in november or december it would be more convenient to type “airline ticket bahamas november,december” instead of “airline ticket bahamas november”, “airline ticket bahamas december” or “airline ticket bahamas (november,december)”

In CSS if we need to set style red of 2 elements, we have to do that: body.app1 div.d1 td.phone span.area, body.app1 div.d1 td.fax span.area{color:red} essentially duplicating prefix body.app1 div.d1 and suffix span.area

If priority of OR was higher than AND we would write this in CSS: body.app1 div.d1 td.phone,td.fax span.area{color:red}

Of course, this idea can be developed into having 2 operators OR one with higher priority than AND and one with lower, for example ‘,’ is higher, ‘;’ is lower, but in many cases languages don’t have spare symbols to extend that way and also existing priority of “,” where it’s used is low.

  • 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-12T17:28:14+00:00Added an answer on May 12, 2026 at 5:28 pm

    Considering the fact that the background of OR and AND is from mathematical logic where they have well defined precedence, you can not violate that precedence in your design without confusing a VAST majority of the users.

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

Sidebar

Related Questions

I have a pretty common layout issue that I have traditionally used a table
Traditionally, when we use SQL string to done some work, we have to close
I have a product which has been traditionally shipped as an MSI file. It
Every single book that teaches programming (or almost anything else) starts off with a
Traditionally I've written the majority of my server maintenance scripts in bash like most
Consider the following method that stops a service: Public Function StopService(ByVal serviceName As String,
Like most developers here and in the entire world, I have been developing software
I have an application that displays a dialog when the user needs to enter
Building a multilingual application that should work with the most prevalent global alphabets but
I traditionally work in VB.NET, but have been asked to code the latest project

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.