| ▲ | conartist6 5 hours ago | |
How is it cleaner? I used to actually do that. I wrote everything twice. I even built fancy tools to help me write everything twice. But the bigger problem here is that sync and async aren't enough. You almost need to write everything three times: sync, async, and async-batched. And that async-batched code is gonna be gnarly and different from the other two copies and writing it in the first place and keeping it in sync is gonna give you headaches. To see how it played out for me take a look at the difference between: https://github.com/iter-tools/regex/blob/a35a0259bf288ccece2... https://github.com/iter-tools/regex/blob/a35a0259bf288ccece2... https://github.com/iter-tools/regex/blob/a35a0259bf288ccece2... | ||