On Monday, 10 June 2013 at 11:10:06 UTC, Jacob Carlborg wrote:
On 2013-06-10 11:03, Stephan Schiffels wrote:

I agree. Do people have the same opinion on the builtin reverse? I don't remember whether there was a discussion about this. I suggest to kill that as well. sort and reverse are perfectly well implemented in the
standard library rather than builtin.

"reverse" is implemented with the stupid name "retro".

That's not correct, it's called "reverse" and is a builtin property of dynamic arrays, see bearophiles answer... "retro" is lazy!


Is anyone actually on this? I could try to dig into it, I guess I could start looking for spurious places in phobos and druntime where these builtin functions are used and replace them with the library ones. If we deprecate it in the end we don't want to see it being used anywhere in
the standard implementations.

Perhaps start with modifying the compiler to indicate the "sort" and "reverse" functions are deprecated. Then it will be easier to find in Phobos and druntime. Also, if used in druntime they need to be reimplemented there.

Right, I thought so, too. Indeed, bearophiles issue addresses this in this order. I will try this on a local branch first and possibly open a pull request to start a more concrete discussion on this...

Stephan

Reply via email to