On 30/04/2004, at 11:47 PM, Butler, Gerald wrote:
1. String - low-level, abstract, base class (or in Perl6 terms role -- I think) which represents a "logically" contiguous series of Parrot Int
2. BinaryString - inherits from String, represents a "logically" contiguous series of "bytes/bits"
3. TextString - inherits from String, represents a series of
characters (where character is an abstract thingy which in the concrete of a
specific "font" is a particular "glyph") -- I'm hand-waving at the concept of
"font" and "glyph" here, but, I think you get the idea.
Please, let's not ever mix the word "binary" and "string" in the same sentence again! One language already made this mistake: the Haskell standard library has many binary file reading/writing functions operating with "strings" (which, in Haskell, is a list of characters or [Char], where character = thingys which Jeff defined quite nicely), rather than returning a "stream of bytes" ([Word8], in Haskell terminology), which is binary data--what they should've returned.
Of course Parrot should have a function to reinterpret something of a string type as raw binary data and vice versa, but don't mix binary data with strings: they are completely different types, and raw binary data should never be able to be put into a string register. Maybe some blurring of binary data/strings should happen at the Perl layer, but Parrot should keep them as distinct as possible, IMHO.
-- % Andre Pang : trust.in.love.to.save