<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>Yes, I was referring to native module clients (not C, nor anything else modules) to be able to change rep, is a violation.<br>About the problem of type, is that REF CHAR is a value space strictly more than Latin-1, so this is what I mean, encoding in one type or another must be determined by its subexpressions not by defaults like TEXT type, this is what I mean, width subtyping refers to add some value range as you say may or may be not in the same range of Unicode then it must be called WIDECHAR, you can't call it UCHAR etc, it misses the point of abstraction here, if so, how many types, we would want, 20, 30 according to the bit ending please give a break, we are not C doers, and if we are then call them in your libraries we don't need to contaminate us, sorry I'm not telling that you are being noisy but this certainly could be that (also
me).<br>Rodney, please correct me when I say something wrong but are you saying that you will start to put in every interface procedures and stuff to convert oh no, sorry; I hope I'm not that guy converting because somebody needed an extra interface to code some language, it will be a real mess.<br>Thanks in advance<br><br>--- El <b>dom, 15/7/12, Rodney M. Bates <i><rodney_bates@lcwb.coop></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Rodney M. Bates <rodney_bates@lcwb.coop><br>Asunto: Re: [M3devel] AND (…, 16_ff)… Not serious - or so I hope!<br>Para: "Daniel Alejandro Benavides D." <dabenavidesd@yahoo.es><br>CC: m3devel@elegosoft.com<br>Fecha: domingo, 15 de julio, 2012 11:22<br><br><div class="plainMail"><br><br>On 07/14/2012 08:28 PM, Daniel Alejandro Benavides D. wrote:<br>> Hi all:<br>> making changes of type representation of TEXT in text
makes no sense, it's a violation of the Text abstraction<br><br>No, I disagree here. A primary property of an abstraction is that clients can use it _without_ knowledge of<br>the internal representation. The representation can be changed without altering the behavior of any program<br>that uses the abstraction. A program that imports representation-dependent interfaces such as TextRep.i3 is<br>an exception, but doing so means it known abstraction violator, from the beginning.<br><br>> <a href="http://books.google.com.co/books?id=FbemcUFa0JIC&pg=PA303&dq=source=bl&ots=POGbXUhcW1&sig=WULSpZ74yYU30s-cZ2zhtNTByd8&hl=en&redir_esc=y#v=onepage&q&f=false" target="_blank">http://books.google.com.co/books?id=FbemcUFa0JIC&pg=PA303&dq=source=bl&ots=POGbXUhcW1&sig=WULSpZ74yYU30s-cZ2zhtNTByd8&hl=en&redir_esc=y#v=onepage&q&f=false</a><br>><br>> you are in fact claiming that the
default type of CHAR is Latin-1, I don't get that because you type extend CHAR and say<br>it's not default, there is something bad, I'm some how suspicious about this need to type in *different* two ranges for<br>receiving a character in one type script and one in another, essentially meaning that the language is wrong in<br>declaring TEXT as a opaque type and should use both kind of strings always or worse the non-default type, which is<br>naturally impossible.<br><br>I'm not sure what you are saying here. The language does clearly say that CHAR contains (at least) ISO-Latin-1.<br>But I am not proposing to extend CHAR beyond exactly ISO-latin-1, as it is in every implementation of Modula-3.<br>This is because I am sure doing so would break a large amount of existing code. Such code assumes that<br>BYTESIZE(CHAR)=1.<br><br>I _am_ proposing to extend WIDECHAR to hold Unicode. WIDECHAR was added with this in mind, but today, it<br>fails
because its range is too limited. I think probably WIDECHAR was added at a time when only<br>2^16 code points were in the standard(s). But that has changed. This is a very simple fix of that.<br><br>As for TEXT, the CM3 version is and always was abstract a string of WIDECHAR. The procedures that have<br>parameters of type CHAR just do the widening or narrowing at the time a character is passed in or out.<br>The fact that the current representation holds some characters in 8-bit array elements is hidden by<br>the Text abstraction, and can be changed if convenient.<br><br>In contrast, Wr/Rd and friends do not hide character representations in the stream. This is as it must<br>be, and I am proposing only to add additional representations that they can handle, and make it convenient<br>for the usual case that an entire stream uses the same representation of characters.<br><br><br><br>> Sorry guys, but I'm not agreeing with
you in this one, I hope you make the best of CM3 work or leave alone the package a la DEC-SRC.<br>> If you are thinking in widening the TEXT string package make it polymorphic it doesn't add complexity burden to the language, it explains better the CHAR type and its extension but do it naturally using the language types, don't create your own one with only that purpose.<br>> THanks in advance<br>><br>><br>><br>><br>> --- El *sáb, 14/7/12, Rodney M. Bates /<<a ymailto="mailto:rodney_bates@lcwb.coop" href="/mc/compose?to=rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>>/* escribió:<br>><br>><br>> De: Rodney M. Bates <<a ymailto="mailto:rodney_bates@lcwb.coop" href="/mc/compose?to=rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>><br>> Asunto: Re: [M3devel] AND (…, 16_ff)… Not serious - or so I hope!<br>> Para: <a
ymailto="mailto:m3devel@elegosoft.com" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Fecha: sábado, 14 de julio, 2012 15:05<br>><br>><br>><br>> On 06/27/2012 02:58 AM, Dirk Muysers wrote:<br>> > Some time ago I have started to develop a unicode library based<br>> > on the old M3 text model but using UTF-8 internally rather than<br>> > Latin-1 (see README attachement). For reasons best known to<br>> > me I had to put it on the backburner in favour of more urgent work.<br>> > If anybody is interested in furthering this solution I would eagerly<br>> > give the existing (pre-alpha) code away.<br>> > This being said, there are certainly better hash algorithms than the<br>>
> one used by m3core (eg Goullburn, see<br>> > <a href="http://www.clockandflame.com/media/Goulburn06.pdf" target="_blank">http://www.clockandflame.com/media/Goulburn06.pdf</a>).<br>> ><br>> ><br>> And:<br>><br>><br>> 1. Properties<br>><br>> This part deals with properties of Unicode code-points/characters. We call Unicode code-points "runes" for brevity.<br>> Unlike WIDECHAR's, runes cover the the whole gamut of the Unicode specification. We could have defined a Rune as<br>> TYPE Rune = [0..16_10FFFF], but unfortunately not all values in the code-point range are valid and others are left<br>> undefined, so a "Rune" is defined as an integer. The library uses defensive programming by not
allowing a string to<br>> contain any invalid or undefined Rune.<br>><br>> I don't understand the reasoning here. Your criticism of the subrange type is that it contains invalid values<br>> between the bounds, which you address with dynamic value checks inside the library code. But why eliminate the<br>> subrange and changing the type to an integer? It only drastically increases the number of invalid values,<br>> by a factor of over 2^11 times, if integer is 32-bit, otherwise more. And it demotes the status of these<br>> from statically-detected, in one compile, to dynamically-detected, requiring massive testing to get an even<br>> partial level of confidence. It also precludes storing them in less than 64 bits on a 64-bit
machine.<br>><br>> Am I missing something?<br>><br><br></div></blockquote></td></tr></table>