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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:03:53+00:00 2026-05-27T23:03:53+00:00

I was looking at the source code to qTip 2 and saw the following:

  • 0

I was looking at the source code to qTip 2 and saw the following:

// Munge the primitives - Paul Irish tip
var TRUE = true,
   FALSE = false,
    NULL = null;

I can’t come up with a reason you should ever do this, and have a strong feeling that it would just encourage bad coding habits. Say a developer makes a typo in a Yoda condition like if (TRUE = someCondition()), then TRUE could very well end up actually meaning false, or you might end up assigning someObject to NULL.

I guess I’m just wondering if there’s some redeeming quality for this practice that I’m missing, or if this is just a plain old Bad Idea™

  • 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-27T23:03:53+00:00Added an answer on May 27, 2026 at 11:03 pm

    The goal of this is just to improve compression, Paul Irish himself calls it as an “Anti-Pattern”.

    He describes it as “Good for compression and scope chain traversal” on the following presentation:

    • jQuery Anti-Patterns for Performance & Compression (slide 46)

    On scope chain traversal, we won’t see any improvement on literals as null, false, true, since the scope chain is not inspected, they are just literals.

    On other identifiers as undefined or windows the scope chain traversal is indeed inspected.

    Paul Irish Anti-patterns slide 55

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

Sidebar

Related Questions

Looking through the source code of a binary tree,I find the following function: //definition
I was looking at the source code for ncmpcpp, and I saw this. #include
I'm looking at source code from Funambol, but the dependencies are so huge, I'm
I'm looking for source code for a web based study group. I'd prefer something
I was looking a source code of a particular page of my project and
I was looking at the source code of java.uti.concurrent.locks.AbstractQueuedSynchronizer and the acquire() method looks
I'm looking for the source code of Sun's standard java compiler, javac . jdk1.6.0_07
I am looking though some source code from a third party and am repeatedly
I am just looking at the source code of BlogEngine.Net and was intrigued at
I have been looking at the source code of the IronPython project and the

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.