[ENH] FileNamedDo-ab (v. 2,
added a bunch of similar methods) ( could have fewer methods )
ly4aegw02 at sneakemail.com
Fri Jan 30 21:31:02 UTC 2004
On Fri, 30 Jan 2004 00:42:00 -0400, Lex Spoon wrote:
> Instead of adding a zillion variant methods, an alternative is to have
> one closeAfter: method. Then you'd write the code like this:
> file := FileStream <insert one of bazillion open commands>.
> file closeAfter: [ ... ]
I agree with that factoring, but is that better than:
file := FileStream <insert one of bazillion open commands>.
[ ... ] ensure:[ file close]
which can be done without adding new methods?
More information about the Squeak-dev