|
|
|
|
|
by arcbyte
1231 days ago
|
|
This seems similar to an itch I've had for a while on many languages. I have quite often wanted the ability to easily collect the arguments to a function call together in a structure with the function itself, and defer the execution of the method. I want a closure essentially but with the ability to reflect and inspect the arguments and function, potentially make changes, and execute it later. Of course the only real way to do this in most languages is to make every single thing i want to do a single-function class with public "argument" members. But that messes with the structure of the code. It would be really nice to have some syntactic sugar for extracting a class for function calls and their arguments. The decree pattern seems similar the solution I've described above but avoided implementing because it sounds crazy. |
|
https://stackoverflow.com/questions/3188048/how-to-bind-argu...