On 2 May 2014 00:06, Tony Arcieri <[email protected]> wrote:
> This sounds like the exact same painful failure mode as Ruby (transcoding
> blowing up at completely unexpected times) with even more complexity, making
> it even harder to debug.

Here is a concrete example of when this would blow up:

1. You have a rope with non-ascii characters.
2. You attempt to "encode" into "ascii".

It blows up – as expected, because "ascii" is a limited encoding.

It will only ever fail during the explicit "encode" operation. How is
that unexpected? All code that needs an output in "ascii" must
consider whether the input is compatible.

In Ruby (as I understand it now), any string operation that involves
two or more strings can blow up at run-time because of the implicit
transcoding. This is not how the proposed rope-like data structure
would work.

\malthe
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to