Smalltalk is home to perhaps the first truly elegant streams implementation, particularly when compared to other approaches developed around that time, such as those in C and C++. You can’t get much simpler than ‘myfile.txt’ asFilename readStream contents to open and read a file, and yet there’s significant power in the classes behind that. But new designs for stream libraries since followed, including pluggable/chainable I/O stream architectures, such as those found in Java, C#, and even advanced parallel stream processing frameworks.
Not to be outdone, Michael Lucas-Smith and Martin Kobetic have recently developed a new pluggable stream framework for Smalltalk called Xtreams, and I couldn’t resist giving it a try. In the authors’ own words,
Xtreams is an abstract producer/consumer pipeline over arbitrary source and destination types… you get a unified API for accessing files, sockets, pipes, strings, collections and many many other kinds of things.
I've been anxiously awaiting the use of XTreams (and the parsing tools built on top of it) for a while with Squeak. Looks like that's also getting close to reality too.