News for hackers. Stuff that matters.
Re:Swapping two Numbers without Temporary Variables by jslaby on Thursday March 24, 2022 @03:05PM (#30794088)
or with a static variable
Re:Swapping two Numbers without Temporary Variables by Thiez on Thursday March 24, 2022 @06:27PM (#30796168)
Congratulations, your program is now thread-unsafe because you thought using a temporary variable is expensive :-p using mutable static variables is a terrible idea in most situations.