Github user rednaxelafx commented on the issue:
    Aha! Thanks @kiszk san for working on this! I really wanted the stateless 
methods to be extracted so that I can use more utils without having to pass 
around a `CodegenContext` for no good.
    I was actually working on the exact same thing last week but got carried 
away on other tasks so my patch is still WIP.
    For those curious, here's my WIP patch:
    I was hoping we can cover the ones I extracted here:
    Your PR and my version extracted mostly the same fields/methods, which is 
great for me that I'll just help get this PR in instead of having to send mine 
    The approach is different, though. I'd like to have a discussion on the 
tradeoffs you had in mind when you picked your approach.
    I initially did something similar, which is to extract stateless methods 
into companion object methods and change the original one to delegate to the 
companion one. But the old instance methods were a bad smell to me (passing in 
a instance when it shouldn't need the instance), so since we're at it, I 
thought why not just completely remove that bad smell once and for all.
    So I deleted the original instance methods, and yes that made the diff huge 
because all use sites of those fields/methods have to be touched to switch to 
using the new version.
    @kiszk WDYT? Were you intending to minimize the diff but still want to be 
able to access the stateless util methods as standalone functions?


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to