Re: [boost] Survey: What should an immutable byte sequence data structure be named?

I agree with Dave. Buffer. Python uses "frozen" to describe the same (similar?) property for sets. On Jan 28, 2011 3:10 PM, "Dave Abrahams" <dave@boostpro.com> wrote:

But is not a buffer (with its implicit assumption of being a "bunch of bytes"), since - according to DMB - it is an immutable finite sequence of "anything", i.e., the concept behind std::vector, albeit immutable, so immutable_vector. We should definitely separate these two concerns quite clearly and explain *exactly* what the purpose of that immutable finite sequence type is; is it intended *only* for use from text-handling "higher-level" notions? If so, why? And, where did that "sequence of *anything*" come from then? So: boost::immutable_vector (or boost::immutable_array, which fits better w.r.t. part of the immutability - no change of length - but fits poorly on the quite engrained tacit assumptions about an array's runtime characteristics.) /David On Jan 28, 2011, at 4:14 PM, Andrew Sutton wrote:
I agree with Dave. Buffer.
Python uses "frozen" to describe the same (similar?) property for sets. On Jan 28, 2011 3:10 PM, "Dave Abrahams" <dave@boostpro.com> wrote: _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

By the way, why can't we use "const_" as the prefix of whatever such a type would be called? Would it be too tempting to think "const foo" for "cost_foo"? Would that lead developers astray? boost::const_sequence or boost::const_seq? If we skip the *anything* part of the sequence, we could have boost::const_buf... /David On Jan 28, 2011, at 4:23 PM, David Bergman wrote:
But is not a buffer (with its implicit assumption of being a "bunch of bytes"), since - according to DMB - it is an immutable finite sequence of "anything", i.e., the concept behind std::vector, albeit immutable, so immutable_vector.
We should definitely separate these two concerns quite clearly and explain *exactly* what the purpose of that immutable finite sequence type is; is it intended *only* for use from text-handling "higher-level" notions? If so, why? And, where did that "sequence of *anything*" come from then?
So: boost::immutable_vector (or boost::immutable_array, which fits better w.r.t. part of the immutability - no change of length - but fits poorly on the quite engrained tacit assumptions about an array's runtime characteristics.)
/David
On Jan 28, 2011, at 4:14 PM, Andrew Sutton wrote:
I agree with Dave. Buffer.
Python uses "frozen" to describe the same (similar?) property for sets. On Jan 28, 2011 3:10 PM, "Dave Abrahams" <dave@boostpro.com> wrote: _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

At Fri, 28 Jan 2011 16:27:43 -0500, David Bergman wrote:
By the way, why can't we use "const_" as the prefix of whatever such a type would be called? Would it be too tempting to think "const foo" for "cost_foo"? Would that lead developers astray?
Yes. The kind of immutability Dean is proposing is very explicitly *not* what you get with const. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On 1/28/11 1:23 PM, David Bergman wrote:
We should definitely separate these two concerns quite clearly and explain*exactly* what the purpose of that immutable finite sequence type is; is it intended*only* for use from text-handling "higher-level" notions? If so, why? And, where did that "sequence of*anything*" come from then?
My understanding was that calling it a sequence of bytes was done to explicitly indicate that the data structure can handle *any* sequence of bytes, not just text, so that it is a generic data structure rather than one specialized for text-handling or some other "higher-level" purpose. Cheers, Gregory Crosswhite

At Fri, 28 Jan 2011 16:23:09 -0500, David Bergman wrote:
But is not a buffer (with its implicit assumption of being a "bunch of bytes"), since - according to DMB - it is an immutable finite sequence of "anything", i.e., the concept behind std::vector, albeit immutable, so immutable_vector.
We should definitely separate these two concerns quite clearly and explain *exactly* what the purpose of that immutable finite sequence type is; is it intended *only* for use from text-handling "higher-level" notions? If so, why? And, where did that "sequence of *anything*" come from then?
You added it, I think. See the original question in the subject. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On Jan 29, 2011, at 5:12 AM, Dave Abrahams wrote:
At Fri, 28 Jan 2011 16:23:09 -0500, David Bergman wrote:
But is not a buffer (with its implicit assumption of being a "bunch of bytes"), since - according to DMB - it is an immutable finite sequence of "anything", i.e., the concept behind std::vector, albeit immutable, so immutable_vector.
We should definitely separate these two concerns quite clearly and explain *exactly* what the purpose of that immutable finite sequence type is; is it intended *only* for use from text-handling "higher-level" notions? If so, why? And, where did that "sequence of *anything*" come from then?
You added it, I think. See the original question in the subject.
Well, I did not add it to the discussion, since it was how Dean envisioned the particular immutable sequence he had in mind, which was the precursor (and context) to this new and fresh email thread :-) My mistake for trying to clarify the distinction in the wrong concrete thread. Sorry. /David

How about something like "atomic_buffer" (or _text, _string, etc)? There is some precedent with "atomic operations" where multiple normally separate things are made indivisible. --ges
participants (5)
-
Andrew Sutton
-
Dave Abrahams
-
David Bergman
-
Gregory Crosswhite
-
Schrader, Glenn - 1002 - MITLL