TFA is overly pedantic, but your swap() method is not generic and falls apart if the class has more than one instance variable. In Lisp, for example, it's trivial to write a swap macro -- not very fair, I suppose. In Tcl you can have a proper swap that is not a macro (which is good, since Tcl does not have macros!) by using Tcl's pass-by-name semantics. In C++ you can just declare the arguments as references and then you won't notice at the call site that the arguments are being passed by reference -- super convenient, but then somewhat scary as well. And so on.