D-Programming-Language/druntime — pull request #757 by JinShil (2014-03-27 22:54:01+00:00)
Title: Mark `clear` as `deprecated`

This pull follows up on a change in 2.060.0 (http://dlang.org/changelog.html#new2_060)

"clear has been renamed to destroy, and clear (as an alias to destroy) has been scheduled for deprpecation."

It appears to be overdue.

Its continued existence can cause confusion with other methods named 'clear' due to UFCS, and also causes confusion for students of D as can be witnessed here (http://forum.dlang.org/thread/ogpnmoyqbldexrmijexa@forum.dlang.org#post-ogpnmoyqbldexrmijexa:40forum.dlang.org)

Although it may be safe to eliminate it completely, this PR simply marks it as deprecated, so any existing uses of `clear` are flagged with warnings. `clear` can be eliminated aftter a couple of releases with this deprecation warning in place.

Accompanying documentation pull request to come shortly.