2010/12/8 Levente Uzonyi <leves@elte.hu>:
On Tue, 7 Dec 2010, Philippe Marschall wrote:
snip
No, buffering should not be in a subclass or even the file stream class itself. Buffering should be an other class that wraps file stream.
Stream wrappers are cool, but they are totally different from the current stream design. One could create new stream classes that could do buffering, conversion, compression, etc. and rewrite existing code to use them, but if you just rewrite the existing code using an existing stream library (for example XTreams), then you'll get pretty much the same thing with less effort.
By now, you have at least two wrapper libraries: The VW Xtreams port at http://www.squeaksource.com/Xtreams.html These are wrappers focused on clean-ness / cross dialect portability. Efficiency is not at top but might be improved later. Also the SqueaXTream at http://www.squeaksource.com/XTream.html more focused on efficiency. I don't count Nile which provides a few wrappers but is more oriented toward Traits composition. Nicolas
Levente
Cheers Philippe