Short circuit evaluation using procedures
问题 I am currently developing a compiler for a very limited object oriented language. I want to treat all values as objects and operators on those values will be implemented as methods. The compiler transforms the program into assembler for a stack-based virtual machine. During compilation I transform integer literals into objects of a special "Integer" class. Arithmetic operators are implemented as methods of that class (using inline assembler). So that 4 + 5 basically equals to 4.add(5) . The