Timothy Rowledge tim at
Tue Jan 27 03:12:52 UTC 2004

On Jan 26, 2004, at 6:27 PM, Andreas Raab wrote:

> Hi Tim,
> [sip]

> Not quite completely true,
> Why not?
Well, for the reason I elucidated later in the message. Note that I'm 
not claiming any rightness or wrongness in the approach, simply that 
saying "you can't do it " isn't correct. Besides, we haven't had an 
argument about something fun in ages. :-)
> [snip]
> Wouldn't matter one bit. (Am I really explaining myself so poorly?)
Yup; remember I'm having to cross-translate into Canadian these days, 

>     file := self openFile:''.
>     file == FailedResourceAllocationDoohickey
>         ifTrue:[^self error: 'could not open file']. "or whatever"
>     [self doSomethingWith: file] ensure:[file close].
I agree that that is pretty much how _I_ would choose to do it too but 
if someone really preferred the pattern with the allocation inside the 
ensured block then I feel sure it could be made to function adequately. 
And I'd rather see a pattern I don't favour  actually working than not 
working; at least it doesn't mean broken functionality.

tim, eh.

More information about the Squeak-dev mailing list