[Cuis-dev] Exception handler blocks with non-local returns

Andres Valloud ten at smallinteger.com
Tue Oct 15 12:56:33 PDT 2019


On 10/15/19 10:45, Phil B via Cuis-dev wrote:
> Unless the intent of those methods is to transfer control to the 
> exception. Assuming that is the case, was the intent that this transfer 
> of control be optional or mandatory?

The impression I get is that control transfer becomes mandatory once the 
application uses on:do:.  In our context, the exception framework has 
decided to take action by now, yet it's nice enough to listen to the 
application's stated preference in [:ex | ... ].  So, let's be nice and 
say our bit, with the understanding that the common case default is to 
ex return: (the value of the handler block).

Note the unstated subtlety: this exception frameweork is class based, so 
it is an obvious design feature that exceptions can reimplement messages 
like #return:, and even parts of the exception handling itself.  Tacitly 
hardcoding handler blocks prevents even the consideration of that 
possibility (because handler blocks do not explicitly say what they 
want), so overall we get a more brittle, less fruitful system.

Andres.


More information about the Cuis-dev mailing list