[phobos] Improvement of stream

Andrei Alexandrescu andrei at erdani.com
Mon Jul 5 08:29:58 PDT 2010


On 07/05/2010 09:59 AM, Shin Fujishiro wrote:
> Is the handle a similar concept as the container?

Well not quite because a container does not need put an emphasis on 
"opening" and "closing".

> That is, I reckon a handle is a reference type object that has its own
> resource and provides some ranges on top of it for accessing and
> manipulating the resource:
>
> class ConceptualHandle
> {
>      void open();    // ?
>      void close();
>      ByChunk byChunk(size_t n);
>      ByChar byChar();
>      Writer blockWriter();
> }

Yes, that seems plausible.

Andrei


More information about the phobos mailing list