Partial class implementation

Bill Baxter dnewsgroup at billbaxter.com
Mon Jul 16 23:33:36 PDT 2007


janderson wrote:
> Robert Fraser wrote:

> There is no real point in arguing this.  My main argument is based on 
> code refactorbility and design.  I find free functions are much more 
> reuseable then member functions, look at algorithms in std (find, sort 
> ect...).

Does that really hold true for D though?  Without Koenig lookup, free 
functions don't have the same flexibility they do in C++.  You can write 
generic template functions like find, sort, etc, where there is a single 
implementation and callers have to implement the concept it requires. 
But something like 'toString' as a non-member is pretty much impossible 
in D.

--bb



More information about the Digitalmars-d mailing list