"in" everywhere
Steven Schveighoffer
schveiguy at yahoo.com
Fri Oct 8 04:58:27 PDT 2010
On Thu, 07 Oct 2010 21:18:56 -0400, Juanjo Alvarez <fake at fakeemail.com>
wrote:
> On Thu, 7 Oct 2010 15:53:13 -0700, Jonathan M Davis
> <jmdavisProg at gmx.com> wrote:
>> Except that when you're dealing with generic code which has to deal
> with
>> multiple container types (like std.algorithm), you _need_ certain
> complexity
>> guarantees about an operation since it could happen on any
> container that it's
>
> Then, don't use it in std.algorithm or any other code that needs
> guaranteed complexity, just like now. I don't see the problem with a
> generic "in" operator, nobody would be forced to use it.
That kind of "documentation" is useless, it doesn't prevent use, and it
doesn't feel right to the person who accidentally uses it. When I call
sort(x);
and it performs horribly, am I going to blame x or sort? Certainly, I'll
never think it's my own fault :)
-Steve
More information about the Digitalmars-d
mailing list