Larry Wall wrote:

On Thu, Mar 31, 2005 at 03:03:09PM +0200, Thomas Sandlaß wrote:

: BTW, will bidirectionality be supported? Does it make sense to reflect
: it in the StrPos type such that $pos_start < $pos_end means a non-empty
: left to right string, $pos_start > $pos_end is a non-empty right to left
: string and $pos_start == $pos_end delimit an empty (sub)string? As a
: natural consequence the sign indicates direction with negative length
: beeing right to left.  And that leads to two times two types of iterators:
: left to right, right to left, start to end and end to start.

Offhand I'd rather have end < start be undefined, I think, but I
suppose we could give it a meaning if it turns out not to be an
easily generated degenerate case like 0..-1.  On the other hand,
I think right-to-left might deserve more Huffman visibility than an
itty-bitty sign that might be hidden down in a varible.

But then, we've played games with signs in substr and splice before.
It's not clear that people would want substr($x, -3) to return the
characters in reversed order, though.

I don't see how rtl vs ltr changes how we process strings. It's purely a display problem. I seriously doubt the someone working with a rtl language would ever wish to count the characters ltr. And note that we are calling the positions "start" and "end", not "left" and "right".

If I'm missing something basic here, let me know.

-- Rod Adams

Reply via email to