Thread overview | ||||||
---|---|---|---|---|---|---|
|
March 12, 2013 DList.removeAny | ||||
---|---|---|---|---|
| ||||
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? |
March 12, 2013 Re: DList.removeAny | ||||
---|---|---|---|---|
| ||||
Posted in reply to thedeemon | 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.
|
March 12, 2013 Re: DList.removeAny | ||||
---|---|---|---|---|
| ||||
Posted in reply to jerro | 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.
|
March 12, 2013 Re: DList.removeAny | ||||
---|---|---|---|---|
| ||||
Posted in reply to thedeemon | 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
|
Copyright © 1999-2021 by the D Language Foundation