News for hackers. Stuff that matters.
Re:Programming Algorithms in Lisp: Data Structures by taeric on Wednesday August 07, 2019 @12:42AM (#20632029)
Common lisp's multiple values took some getting used to. In particular, having gotten used to tuples and lists, it is somewhat bending to realize you can return multiple things without either.
Re:Programming Algorithms in Lisp: Data Structures by dreamcompiler on Wednesday August 07, 2019 @01:23AM (#20632174)
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.

Re:Programming Algorithms in Lisp: Data Structures by heisig on Wednesday August 07, 2019 @02:58AM (#20632517)
Even better, the first few multiple values are typically returned in CPU registers and not on the stack.