darcs patch: add withFile and withBinaryFile (#966)
dagit at codersbase.com
Thu Oct 26 04:18:43 EDT 2006
On 10/26/06, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Wed, Oct 25, 2006 at 11:16:25PM -0400, Samuel Bronson wrote:
> > On 10/25/06, Ross Paterson <ross at soi.city.ac.uk> wrote:
> > >Thu Oct 26 01:10:44 BST 2006 Ross Paterson <ross at soi.city.ac.uk>
> > > * add withFile and withBinaryFile (#966)
> > >
> > > To be discussed on the libraries list until Thursday 9th November 2006.
> > >
> > > These functions are fairly small, but they're worth naming because they
> > > wrap up a pattern that should be encouraged.
> > I think this bikeshed would be nice in red. (Or: why would it take two
> > weeks to discuss this?)
> OK, I should have phrased that as "Please make any comments on the
> libraries list by <date>" (because that's when I'm committing the patch
> if I don't hear any objections). It's an experiment with the new process.
> So do you have a comment?
My only comment is that this is a Good Thing(tm). Back when I did a
lot of lisp I remember someone telling me, "Figure out the correct way
to open a file, do something with it, catch any exceptions, clean up
and pass on any exceptions. Then, once you know how, write a macro
and never do it by hand again!" (Common Lisp does already have a
macro just like this, but the point remains.)
More information about the Libraries