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.
[ Parent
| on HN ]
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.