3 ms·
The key feature of multiple values is that each value gets passed back to the caller on the stack, not the heap. So they don't cons garbage the way returning a
by dreamcompiler 7y ago
The key feature of multiple values is that each value gets passed back to the caller on the stack, not the heap. So they don't cons garbage the way returning a list or struct would.
This is a natural thing to do in assembly language. Common Lisp just makes it available in a high level language.
- heisig 7y agoEven better, the first few multiple values are typically returned in CPU registers and not on the stack.