31

const true = false; 🤔
(from r/ProgrammerHumor)

Comments
  • 2
    Cheat Engine
  • 3
    Dude... I just realized this could be changed with reflection. Just like how you change your mind IRL.
  • 2
    Even in C++ you can change it with a super nasty const_cast (although the type is missing 😂 I assume it's bool)

    But if you have

    static constexpr bool MY_MIND { true; }

    Then nope, sir you just can't!
  • 0
    You could never compile that, true is a reserved name
  • 0
    Disassembly
    Binary patch
  • 0
    (()=>{
    var MY_MIND = true;
    MY_MIND = false;
    })();
    // Try me
Add Comment