In 2022, I did this weird little experiment where I redesigned the net/http Handler in #golang. Rather than having a ServeHTTP(w, r) method, I instead broke it into two parts - a handler, and a responder that is returned from the handler. ๐งต๐
While using this approach I found it had a few perks, but it also made a few things more annoying to do. The biggest drawback was how weird it looked compared to the standard library. That alone is probably reason enough to not use this approach in a real app.
This was all just a thought experiment to see what was possible and how it worked. If you want me to write a larger write-up and share the code a like/share will help me know there is interest -
Loading suggestions...