This page describes the process we will follow to replace the current Stream library by Nile, a complete reimplementation based on traits. See http://www.squeaksource.com/Nile.
Cleaning Squeak
- avoid direct references to classes like ReadStream or WriteStream
- Work in progress: replace ReadStream on: expr by expr readStream.
Here is the refactoring to do it:
(ParseTreeRewriter new
replace: 'ReadStream on: ``@object' with: '``@object readStream';
yourself)
- Do the same for WriteStream (take care of the two constructors #on: and #with:).
- Do the same for ReadWriteStream.
Adding features to Nile
- Implement InflateStream and the others using NSTDecoder.
- Implements nextChunk and the others in their own class.
Installing Nile
- Nile is available on the Universe and on SqueakSource.
Replacing Squeak streams by Nile
- Start by replacing SequenceableCollection>>readStream to use Nile. Expect things to crash. :-)
- Also, implement !String>>readStream to return an instance of NSStringStream.
Removing the Squeak Stream hierarchy
- This will require changes in a lot of non-Squeak packages. I don't think it will be too hard and just avoiding direct references to ReadStream and WriteStream could be enough.
Changing the semantic of Streams (need discussions)