Closed mhinsch closed 1 year ago
When a low-level function that is called x-hundreds of times is being debugged, I don't want to overlook 500 hundreds iterations. This has been helpful a lot in many circumstances.
I would suggest using a debugger for that or to just insert a call to sleep in the function you want to debug. Cluttering up the API with this is really not nice IMO.
Sometimes it is also not about debugging but being capable of seeing the simulation progress, whether the numbers appearing make sense etc. At this stage of incremental development, it is still good to have this. But at syntax level, something like #102 would lead to a shorted syntax.
Sorry, but this keeps bugging me... How about some global switches and a couple of utility functions to replace verbose/checkAssumptions/sleep? Then you can switch them on or off in main or the REPL and if you need more fine-grained control you just change the values before and after the function call in question.
sleep should be called by the functions calling the simulation functions (i.e. the scheduler) not by the simulation itself.