Restructured version of the Streams library
Takano Akio
aljee at hyper.cx
Sun Jun 11 05:18:35 EDT 2006
Hi,
I wrote an IO library, inspired by, and partly based on,
Bulat Ziganshin's Streams library. The main aim of the library is to
experiment with different design choices, especially emphasizing the
following:
* Many small classes
* Iconv-friendly interface
The source code and documentation can be found at:
http://yogimo.sakura.ne.jp/ssc/
== Type structure
The library tries to assign a different class for a different concept.
For example, it distinguishes read-only streams from write-only ones,
and seekable streams from non-seekable ones. As a result, the library
provides a small and clean interface, so it ensures more type safety,
and type signatures of stream-operating functions are able to carry
more information.
== Iconv friendliness
Although Unicode is quickly becoming popular, there are still many
widely-used, character-set-specific encodings. Therefore i18n-aware
applications may have to handle a locale-specific encoding, which is
not statically known. Then, using an external conversion routine, such
as iconv, will be virtually the only possible way to go. The library's
interface intaracts well with iconv and other c runtines. This also
means that adding zlib functionality can be easy, for example.
== Performance
The library is currently not very fast. For example, typical repitition
of putStr/getLine is 1.5x slower than the corresponding standard Handle
operations. When you omit locking, the library performs roughly equally
well to the standard Handle.
==
Any comments are welcome.
Regards,
Takano Akio
More information about the Libraries
mailing list