Wouldn’t it be great to have a REPL mode that’s optimised for debugging rather than ultimate performance? Or maybe it has some experimental features that can be turned on at the user’s own risk? Some features that might be useful when debugging at the cost of some potential performance loss:
- Avoid optimising IO code for faster printing
- Method selection and type inference while the user is typing the commands! For example if I am typing
println(x)
andx
is a vector of floats, before typing)
and enter, Julia can probably tentatively select the method and partially compile it shaving off some perceived compile-time. This feature can also be useful when running a long script line by line where the whole file can be analysed and compiled behind the scene while running one line at a time. - Error upon dynamic dispatch. This can be useful for debugging type inference issues.
- Error upon allocations. This can be useful while debugging allocations.
Curious to know what folks here think or if you want to add to this list.