Deprecation of 'clear()'

Nick Treleaven ntrel-public at yahoo.co.uk
Thu Mar 27 05:12:29 PDT 2014


On 27/03/2014 04:24, Mike wrote:
> I ran accross the following statement in the runtime's source code
> (object.di).
>
> // Scheduled for deprecation in December 2012.
> // Please use destroy instead of clear.
> alias destroy clear;
>
> I don't see 'clear' mentioned in the spec and I searched through all of
> the runtime and phobos code and could not find a single instance of it
> being used.  Did it ever 'really' exist?

Yes, but it was just renamed destroy and the alias added. It was listed 
in the 'changed features' part of the changelog for 2.060:
http://dlang.org/changelog.html#new2_060

> I would like to update the deprecated features page
> (http://dlang.org/deprecate.html), but I don't have the historical

I think that page is for language deprecations rather than Phobos ones.

> perspective to do it properly, so I'm asking:
>
> 1.  When was it introduced?
> 2.  When was the decision made to deprecate it?
> 3.  Was there a deprecation process and timeline decided on?  If so,
> what was it?
> 4.  Is it safe to remove from object.di and kill it officially?

Does it cause a problem to keep it there? Any problems have to be 
weighed against the breakage of existing code.

> If you know, fell free to do a pull on the deprecated features page, or
> let me know on this thread, and I'll do the pull.
>
> Thanks for the help,
> Mike
>



More information about the Digitalmars-d mailing list