JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Sun Nov 02, 2008 1:42 pm Post subject: IO lib redesign (ehh) |
|
|
Quote: | The current design of the IO library does not mesh well at all with the underlying implementation. I've never actually got it all working quite right; something's always broken. Tango likes to allocate buffers for me where I don't want them and then IO is not synchronized because some data is sitting in some buffer somewhere. Ugh.
Besides, I never really liked the design of the IO lib in the first place. So there.
So what I'm thinking of instead is to have a very basic "file" object, like the Python file object, and then provide other objects that you can wrap around it as necessary. I mean, if you're going to be iterating over a file line-by-line, chances are you're not going to need to read arbitrary binary data, and vice versa. Doing it this way also makes it really easy to drop in other kinds of "files" as long as they conform to the (very small) interface requirements.
I feel like I'm just finding things to avoid working on the binding library at this point |
I've kind of changed my mind, at least a little bit. The current design does have some very nice benefits, and its overall structure does tend to be a good fit for Tango. I think some things will still be reorganized, though. |
|