Matt Diephouse wrote:
On Apr 12, 2005 12:20 AM, gcomnz <[EMAIL PROTECTED]> wrote:I've been meaning to ask what people thing about having operators that temporarily change the "current lexical Unicode level" for just one single expression. I see them as solving all kinds of corner cases.
This all sounds nice and simple. My only question then is what aboutRod wrote: However, I do like the idea of treating a string as an array of chars. I remember some discussion a while back about making [] on strings do something useful (but not the same thing as C<substr>), but I forget how it ended, and my brain is too fried to go hunt it down. But overall I like that idea. Then you could just say:
@array = $string[];
the instances where you specifically need the array of graphs, codes,
bytes, or whatever? If we can do one, why not all?
That's why C<$string.chars[]> was proposed -- it would be accompanied
by .graphs, .codes, and .bytes. That is all fine and dandy, but I
don't think I should have to think about unicode if i don't want to.
And if I understand correctly, that means that I want everything to
use chars by default. And C<$string[]> would be a nice shortcut for
that.
Unfortunately, I don't have a solid proposal handy, which has kept me from posting it. But since there is some interest in this, I'll throw the concept out there, and see if anyone else has a good idea what they should look like, and exactly how they should work.
-- Rod Adams