Re: [Rd] Possible changes to connections

From: Seth Falcon <>
Date: Thu, 31 May 2007 10:11:13 -0700

mel writes:

>> There could be/was the same debate in C/C++.
>> That's may be just a matter of education about not forgetting
>> to close previously opened doors !

R is not C/C++. In general, one does not expect to explicitly handle memory allocation and release when programming in R. Treating connections differently, when there is no longer any technical reason to do so, is surprising.

Prof Brian Ripley <> writes:
> When I ran some tests I found 7 packages on CRAN that in their tests
> were not closing connections. Four of those are maintained by R-core
> members.
> Even though none were by me, I think this is too easy to forget to
> do!

I agree that it is easy to forget. It is especially easy if one creates so-called anonymous connection references like readLines(file(path)) -- this anonymous idiom seems nature to me when coding R and it would be nice to make it work for connections.

+ seth

Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center

______________________________________________ mailing list
Received on Thu 31 May 2007 - 17:31:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Jun 2007 - 01:34:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.