[Issue 6849] std.algorithm.remove design

2011-11-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849



--- Comment #5 from bearophile_h...@eml.cc 2011-11-15 16:57:35 PST ---
To clear up this bug report I close it and replace it with a a bug report and a
more focused enhancement request.

See bug 6956 instead of Comment #2.

See also bug 6957.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6849] std.algorithm.remove design

2011-11-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849


bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6849] std.algorithm.remove design

2011-10-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849



--- Comment #4 from bearophile_h...@eml.cc 2011-10-26 15:07:02 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > From the same thread:
> > 
> > http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30294
> > 
> > Steven Schveighoffer:
> > 
> > > 
> > > Clearly, index 0 was removed, not index 1.  Please file a bug.
> 
> This is not a design bug, it's an actual bug in the code (does not work as
> designed), it should be separate from this enhancement request.

Right, it's my mistake of mixing two different things in the same issue. Sorry.
I'll open another issue. Please ignore Comment #2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6849] std.algorithm.remove design

2011-10-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849



--- Comment #3 from Steven Schveighoffer  2011-10-26 
10:25:44 PDT ---
(In reply to comment #2)
> From the same thread:
> 
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30294
> 
> Steven Schveighoffer:
> 
> > 
> > Clearly, index 0 was removed, not index 1.  Please file a bug.

This is not a design bug, it's an actual bug in the code (does not work as
designed), it should be separate from this enhancement request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6849] std.algorithm.remove design

2011-10-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849



--- Comment #2 from bearophile_h...@eml.cc 2011-10-26 10:14:57 PDT ---
>From the same thread:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30294

Steven Schveighoffer:

> Here is the resulting array and final state of a:
>
> import std.stdio, std.algorithm;
> void main() {
>  int[] a = [ 0, 1, 2, 3 ];
>  writeln( remove!(SwapStrategy.unstable)(a, 1));
>  writeln(a);
> }
> 
> output:
> 
> [3, 1, 2]
> [3, 1, 2, 3]
> 
> Clearly, index 0 was removed, not index 1.  Please file a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6849] std.algorithm.remove design

2011-10-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6849



--- Comment #1 from bearophile_h...@eml.cc 2011-10-25 16:27:57 PDT ---
I didn't fully understand the situation, as it often happens:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30277

Yet I think the problem exists, and there are Python (and other languages)
programmers too coming to D. See some comments, with an alternative proposal
too, about a replaceInPlace() function:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30281

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---