When using trainAll finished function should be optional
manthanhd opened this issue · comments
Finished function should be optional. Sometimes, you don't care about when the training will finish.
What are the usability implications of this? Does making it optional make it less explicit and hence loosely typed?
It does not make it less explicit. Calling without finishedFunc should return new Error(...) to the caller.
@anubhavsrivastava Yeah that's what I'm debating here. Should it really throw the error or should it just ignore the callback completely?
I find the idea of making callbacks optional similar to how most programming languages make the capturing of return value optional.