www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DList.removeAny

reply "thedeemon" <dlang thedeemon.com> writes:
Documentation for this method says it takes a value from the 
front, but the code actually does the opposite, takes it from the 
back. Shall we fix documentation or the code?
Mar 12 2013
next sibling parent reply "jerro" <a a.com> writes:
On Tuesday, 12 March 2013 at 12:31:45 UTC, thedeemon wrote:
 Documentation for this method says it takes a value from the 
 front, but the code actually does the opposite, takes it from 
 the back. Shall we fix documentation or the code?
Judging by the name, I think documentation shouldn't even specify which element is removed. There are removeFront and removeBack if you want to remove front or back.
Mar 12 2013
parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Tuesday, 12 March 2013 at 12:52:20 UTC, jerro wrote:
 On Tuesday, 12 March 2013 at 12:31:45 UTC, thedeemon wrote:
 Documentation for this method says it takes a value from the 
 front, but the code actually does the opposite, takes it from 
 the back. Shall we fix documentation or the code?
Judging by the name, I think documentation shouldn't even specify which element is removed. There are removeFront and removeBack if you want to remove front or back.
The behavior of removeAny is implementation defined. Documentation should be fixed. Note that removeAny, contrary to the other removes returns will give you the element that was removed.
Mar 12 2013
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 3/12/13 8:31 AM, thedeemon wrote:
 Documentation for this method says it takes a value from the front, but
 the code actually does the opposite, takes it from the back. Shall we
 fix documentation or the code?
Fix documentation. Thanks! Andrei
Mar 12 2013