Phobos for Review: std.buffer.scopebuffer
Dmitry Olshansky
dmitry.olsh at gmail.com
Mon Feb 10 03:30:36 PST 2014
10-Feb-2014 04:59, Walter Bright пишет:
> On 2/9/2014 12:43 PM, Dmitry Olshansky wrote:
>
>> 1. I guess there is a distinctive quality to a buffer (i.e. it's not
>> just any
>> output range). The current interface looks quite arbitrary - is 'pop'
>> required
>> for any buffer?
>
> No, pop isn't required.
Then some canonical picture of what *any* Buffer is would be nice. I'm
having a bit of deja vu with this discussion :)
>> A trait like isBuffer is in order, to allow user code to target
>> any buffers including non-Phobos ones.
>
> I don't understand the point of this suggestion.
If buffer is just an output range and 'put' is enough to model it, then
fine. But see also recent thread on output ranges:
http://forum.dlang.org/thread/atfdzzxutxnduavvzvww@forum.dlang.org#post-atfdzzxutxnduavvzvww:40forum.dlang.org
It could be useful to define a more broad interface as a superset of
output ranges.
>> 2. May need buffer.package.d to import all common buffers (there is
>> only one
>> now, but with time...).
>
> I do not like the idea of "kitchen sink" importing. The package.d thing
> was designed so that we can split up the existing kitchen sink modules
> without breaking user code.
>
Okay.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list