Hello all.
This is a plea from the heart. Parrot was designed from the very beginning
to support abstract interfaces to strings, to avoid the scary hairiness we
had converting a Unicode-agnostic Perl 5.5 into a Unicode-aware 5.6.
Believe me, it was not fun.
So when I see stuff like this in perl6str.pmc:
while (s1 < end && isspace((unsigned char)*s1)) s1++;
I get very sad. Please do not make me sad.
I know, I know, this is all temporary code and we'll only have to rewrite
it all later. But it will get harder to rewrite it all later if this stuff
is all over the codebase.
Part of the problem is that we need to have a good, long thing about if
the functions that an ENCODING provide for us are what we need. I think the
above should be implemented using a string iterator and get_and_advance,
but I don't quite understand how all that is meant to be used.
I think this means we need a strings programming PDD. If this is a good
idea, I'll write one, but I will need help.
But really, really, I honestly think we need to start sorting this out
early, before it becomes endemic and we get so stuck in the *s++ mindset
it's hard to get out again.
Simon