RE: Mutable Bytes
"Mark Hahn" <[email protected]> Sun, 25 Jul 2004 11:40:31 -0700
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <001901c47276$ddace720$0b01a8c0@mark> |
Martin Christensen wrote >I have almost no experience working directly with raw data, >having almost exclusively dealt with data on a more abstract >level, so I'm surely not the best judge. However, I tend to >think of raw data very much as a mutable thing: manipulating >bodies of raw data solely by means of cutting them up and >putting them back together again afterwards doesn't match my >mental model of what I'm doing very well. When working with >text strings, this procedure makes much more sense, since >usually strings are broken up into, and pieced together from, >parts that make sense to a human, e.g. words and sentences. I haven't implemented it yet, but I have on the to-do list to implement Bytes methods that mimic the struct type capabilities that Python has in a module. This would allow you to treat the Bytes data in a bit more high-level contstruct of C structs. It would also allow you to treat the data as an array of structs. I'm open to more ideas in this area. I still haven't been able to wrap my mind around whether this means Bytes should be mutable or not. I am too biased being that I am so focused on the internals. I'll take your input as one vote for making Bytes mutable and I'll abstain for now. Can I get some comments and votes from everyone else? ...<snip>... >If mine differs >from everyone else's, then of course my ramblings should just >be ignored. :-) I would think the opposite. Mainstream opinions are worth less than unique ones.