4 ms·
A debugger doesn't remember the proper steps for me, a written function does. I absolutely use this function in a debugging context. If it didn't exist, could
by Bjartr 4y ago
A debugger doesn't remember the proper steps for me, a written function does.
I absolutely use this function in a debugging context. If it didn't exist, could I get at what I needed? Yes, but it's inconvenient to use reflection to get at private Java fields during a debugging session. Not impossible, just inconvenient.
This function exists as a convenience, but it has to look weird, otherwise its convenience might lure someone into using it to do the wrong thing for a production use case.
Good APIs make the right thing easy and the wrong thing hard.