int readInt(string prompt, validator_t validator) { ... }
as a free standing function and just call it from both parts of your code? What is the benefit of indirection that you create when passing function pointer?
welkam via Digitalmars-d-learn Sun, 06 Sep 2015 12:26:07 -0700
int readInt(string prompt, validator_t validator) { ... }
as a free standing function and just call it from both parts of your code? What is the benefit of indirection that you create when passing function pointer?