3 ms·
Do you have an actual example where you do something 4 layers down the call stack from a subsystem entry point and (only) the lowest level can fail, and further
by jstimpfle 6y ago
Do you have an actual example where you do something 4 layers down the call stack from a subsystem entry point and (only) the lowest level can fail, and furthermore fail in a way that all the layers up the call chain need to bubble up the error? Maybe that can be rewritten so the error occurs / is handled at a more suitable place?
The most obvious idea is: instead of retrieving something 4 layers down, get the information first at the top level, and if there was no error push it down.
I've stopped thinking that syntactic features can solve structural problems. That applies to algebraic types just as it applies to exceptions.