retro() on a `string` creates a range of `dchar`, causing array()

bearophile bearophileHUGS at lycos.com
Tue Apr 17 12:57:52 PDT 2012


Ali:

> The algorithm is smart.

The basic idea for that algorithm was mine, and Andrei was very gentle to implement it, defining it a "Very fun exercise" :-)
http://d.puremagic.com/issues/show_bug.cgi?id=7086


> The algorithm
> above is not exception-safe because stride() may throw. But this way off 
> topic on this thread. :)

You can't expect Phobos to be perfect, it needs to be improved iteratively. If you think that's not exception safe and and there are simple means to do it, then please add this in Bugzilla. Being formally aware of a problem is the second step toward improving the situation.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list