ok, decision time!
I suggest the following:
1. the stream version will be a "must-have" version, since it gives us
2. the string version is optional
what do you think?
On Fri, Apr 24, 2009 at 5:46 PM, Ben Webb <> wrote:
> Daniel Russel wrote:
>> Currently files which need input files take strings with the path to the
>> file name. This is pretty easy, but eliminates the possibility of using
>> more exotic sources and write destinations (such as reading and writing
>> from memory). Since Ben has gotten streams working across the C++/Python
>> bridge, we could switch our interfaces over to using streams everywhere.
> I was just thinking the same thing. If you could only choose one of
> filenames or streams, streams are clearly the more flexible way to go.
> (The only sort-of downside, I guess, is that for things such as density
> maps, the stream would have to be in binary mode to work properly. Right
> now filename-access functions can explicitly request that when they open
> the ifstream, whereas there's no way I know of to check an existing stream.)
> But do we have to choose only one? One could argue that we could
> overload each method, to take either a string or a stream. But it seems
> more sensible to me to only have one method (the stream method)
> otherwise we have lots of extra code paths to test everywhere.
> "It is a capital mistake to theorize before one has data."
> - Sir Arthur Conan Doyle
> IMP-dev mailing list