torch
torch copied to clipboard
[DISCUSSION] Should torch generators not generate context methods at all?
When #182 is finally merged, the new Torch.Pagination
module will be included as a macro to create the paginate_*
and filter_config/1
methods that previously were injected directly into the context module. Should this be taken one step further, and all methods (change_, create_, delete_, get_!, list_, update_) also just be available via the use macro?
These methods could/would be defined via defoverridable
so that users could customize them if desired.
This could have the nice side-effect of not cluttering up context modules. On the other hand, being explicit and having those methods directly available to the user via the generator task is nice, and sort of the expected output of running the generator. This being an admin tool, where these methods likely aren't updated often by most users, I'm not sure which is more desirable.