Re:Lisp-Stick on a Python
by flohofwoe on Tuesday November 15, 2022 @07:29AM
(#33608309)
Since the OP wanted to return an array, the correct answer would probably be to return a simple native array, not a complex stdlib container:
In C one needs to wrap the array in a struct type to work around the pointer decay:
Both solution don't use heap allocation but pass around the array data by value on the stack (or in registers). That's one of the few cases where Rust code actually turns out more simple than the C equivalent ;)
[ Parent
| on HN ]
There are no comments on this comment yet.