One case of careless opDispatch :)

Nick Sabalausky a at a.a
Thu Jul 15 16:52:46 PDT 2010


"Dmitry Olshansky" <dmitry.olsh at gmail.com> wrote in message 
news:i1nns8$d4g$1 at digitalmars.com...
>
> The tricky part is that *any* class with unconstrained (or loosely 
> constrained) opDispatch is also a Range, and at least a bidirectional one, 
> since it "provides" all the primitives: front, popFront etc.
> In fact such classes could penetrate almost any attempts at C++ trait-like 
> stuff  and should be avoided.
>
> The moral: unconstrainted opDispatch == TROUBLE.
> Hope that helps!
>

Duck typing == TROUBLE




More information about the Digitalmars-d mailing list