digitalmars.D - Deprecation of 'clear()'
- Mike (20/20) Mar 26 2014 I ran accross the following statement in the runtime's source
- Nick Treleaven (7/27) Mar 27 2014 Yes, but it was just renamed destroy and the alias added. It was listed
- Steven Schveighoffer (11/21) Mar 27 2014 clear is part of the language, and runtime. Not phobos. It's akin to
- Mike (5/5) Mar 27 2014 On Thursday, 27 March 2014 at 04:24:45 UTC, 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? I would like to update the deprecated features page (http://dlang.org/deprecate.html), but I don't have the historical 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? 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
Mar 26 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_060I would like to update the deprecated features page (http://dlang.org/deprecate.html), but I don't have the historicalI 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
Mar 27 2014
On Thu, 27 Mar 2014 08:12:29 -0400, Nick Treleaven <ntrel-public yahoo.co.uk> wrote:On 27/03/2014 04:24, Mike wrote:clear is part of the language, and runtime. Not phobos. It's akin to string.I would like to update the deprecated features page (http://dlang.org/deprecate.html), but I don't have the historicalI think that page is for language deprecations rather than Phobos ones.Before TDPL came out. It was intended somewhat to do the job of delete (a to-be-deprecated feature), but without the memory deallocation.perspective to do it properly, so I'm asking: 1. When was it introduced?Yes, typically, one imagines calling clear on a container to clear all the elements, not destroy the container itself. The advent of UFCS makes this prone to confusion. That being said, I don't know the deprecation schedule, if there is one. -Steve4. 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.
Mar 27 2014
On Thursday, 27 March 2014 at 04:24:45 UTC, Mike wrote: Code pull request: https://github.com/D-Programming-Language/druntime/pull/757 Documentation pull request: https://github.com/D-Programming-Language/dlang.org/pull/531
Mar 27 2014