<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">Legal depends on context, as you note.  If you are able to see the representation of a given text then you can mess with it accordingly.  The pointers for these are not to readonly memory.  Note that you probably will break things if you try to write to TextLiteral.T.buf, since that might be readonly.  Here be dragons, but my point was that every text has an underlying representation that may or may not be sensibly mutable.  I am a strong believer in TEXT being immutable in the general case.</span></div></span> </div><br><div><div>On Feb 26, 2008, at 3:35 PM, Jay wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Is that legal or is that subverting things?<br>It depends on the context?<br>Can the pointers be to read only memory in the code?<br> <br> - Jay<br><br><br><hr id="stopSpelling"><br>> From:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>> To:<span class="Apple-converted-space"> </span><a href="mailto:mika@async.caltech.edu">mika@async.caltech.edu</a><br>> Date: Tue, 26 Feb 2008 15:16:47 -0500<br>> CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: Re: [M3devel] text inefficiency? good mutable string type? arrays?<br>><span class="Apple-converted-space"> </span><br>> ARRAY OF CHAR/WIDECHAR?<br>><span class="Apple-converted-space"> </span><br>> These are available in the various Text implementations. For exampe,<span class="Apple-converted-space"> </span><br>> Text8.T.contents. One can freely mutate these at leisure and the<span class="Apple-converted-space"> </span><br>> higher-level text will appear to change!<br>><span class="Apple-converted-space"> </span><br>> On Feb 26, 2008, at 2:22 PM, Mika Nystrom wrote:<br>><span class="Apple-converted-space"> </span><br>> > Olaf Wagner writes:<br>> >> Quoting Jay <<a href="mailto:jayk123@hotmail.com">jayk123@hotmail.com</a>>:<br>> >><br>> >>> I know this area has been brewing under the surface a while.<br>> >>> I'll bring it up. :)<br>> >>><br>> >>> I assume texts are read only?<br>> >><br>> >> Yes.<br>> >><br>> >>> I know lots of systems have read only strings.<br>> >>> There are pluses and minus to them. They can be single-instanced.<br>> >>> Some systems with read only strings have another type, such as<br>> >>> "StringBuilder" or "StringBuffer".<br>> >>> So -- I don't have a specific question, but maybe a mutable string<br>> >>> "class" aka "type" is needed?Not necessarily in the language but in<br>> >>> m3core or libm3?<br>> >>> Maybe it's already there?<br>> ><br>> > CharSeq.T?<br>><span class="Apple-converted-space"> </span><br><br><br><hr>Climb to the top of the charts! Play the word scramble challenge with star power.<span class="Apple-converted-space"> </span><a href="http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan" target="_new">Play now!</a></div></span></blockquote></div><br></body></html>