On Wed, Mar 07, 2012 at 03:30:15PM +0100, Andrej Mitrovic wrote: > On 3/7/12, Steven Schveighoffer <schvei...@yahoo.com> wrote: > > I'll see if I can do a pull request. > > For my own purposes what I did was wrap StopWatch in a custom struct > and used alias this to overwrite some of its functions. It's one of > the things that makes D so great, I can basically rewrite an external > API with zero hit on performance.
+1. And what makes D even greater, is that it can do this without stupid convoluted syntax that either looks like line noise (*ahem*C++template syntax*ahem*) or rewrites the entire language (*cough*Cmacros*ahem*). > In fact, maybe we should add a note of this capability to the > http://en.wikipedia.org/wiki/Adapter_pattern page (e.g. a > "compile-time adapter" section) Beware the deletionists, though, if you do it. T -- Let's call it an accidental feature. -- Larry Wall