2 ms·
There is another class of error that has been poorly implemented since the demise of Smalltalk - exceptions during testing that can be fixed by the programmer a
by smackeyacky 2y ago
There is another class of error that has been poorly implemented since the demise of Smalltalk - exceptions during testing that can be fixed by the programmer and allow the program execution to continue.
In a lot of the non-trivial systems I've worked on, the setup to do debugging/development work to get to a particular part of the code can often be arduous and time consuming, meaning that if you made a mistake and have to restart your debugging session you then have to go through the setup process again which radically slows down progress on thorny issues.
In Smalltalk it was possible to take an unhandled exception, re-inject a more suitable value and continue debugging so that each "session" was far more productive and the setup issue became much less onerous.
Sadly, .NET, Java, Javascript and Python can't even come close to the power of that ability to catch an exception, modify the object and continue execution. It's a great loss in my opinion. So much of the Smalltalk programming environment has been copied into modern languages but not re-entrant exceptions.
Now, while it was very powerful it could also be heavily abused including at run time, but I still miss that ability.
- steve_gh 2y agoDo any of these languages have anything similar to Ruby's retry within error handling?
- dfe 2y agoYou can do this in a good Java debugger like IDEA. Break on the throw, unwind stack frames to your liking, hot-replace code, continue.
- neonsunset 2y ago> Sadly, .NET, Java, Javascript and Python can't even come close to the power of that ability to catch an exception, modify the object and continue execution. Is that...On Error Resume Next? :D