[squeak-dev] anyone rely on this?

Eliot Miranda eliot.miranda at gmail.com
Thu Jul 3 01:54:55 UTC 2014


On Wed, Jul 2, 2014 at 5:26 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
>
>
> 2014-07-03 1:59 GMT+02:00 Chris Muller <asqueaker at gmail.com>:
>
> On Wed, Jul 2, 2014 at 2:47 PM, Eliot Miranda <eliot.miranda at gmail.com>
>> wrote:
>>
>>> Hi All,
>>>
>>>
>>> (32 to: 127) asByteArray asString do: [:c| c class] =>  '
>>> !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
>>> '
>>>
>>> so far so good.
>>>
>>>
>>> (32 to: 127) asWordArray asString do: [:c| c class] => 'a WordArray(32
>>> 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
>>> 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
>>> 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
>>> 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
>>> 125 126 127)'
>>>
>>> ?!?!?!
>>>
>>> Surely this should be a String of some sort also?  Any objections if I
>>> implement this as such?
>>>
>>>
>> Are you saying you want to override asString in WordArray so you get a
>> string-representation of the WordArray instead of its printString?  I
>> wasn't sure whether the do: part of those code snippets fits into your
>> question and if I missed something..
>>
>>
>>
> Yes, but which string?
> Maybe you wan't to turn the WordArray into a WideString ?
>

This is useful, and symmetrical with ByteArray>>asString..



> Or re-interpret the individual bytes (endianness?) as a ByteString?
>

I don't see this as particularly useful, and is not symmetric.

-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140702/7ba50780/attachment.htm


More information about the Squeak-dev mailing list