3 ms·
For example if you write a json deserializer that's generic over the struct you want to deserialize to (or one in JS that returns a JS object), you'll usually u
by anonymoushn 3y ago
For example if you write a json deserializer that's generic over the struct you want to deserialize to (or one in JS that returns a JS object), you'll usually use some sort of recursion. My generic radix sort[0] also has recursion in it, which seems like the most straightforward way to write it, but of course any recursive function could be mechanically converted to one that does not use recursion.
[0]: https://github.com/alichraghi/zort/blob/main/src/radix.zig#L140 https://github.com/alichraghi/zort/blob/main/src/radix.zig#L...