Re: std.pattern..mixin temptes..std.concurrency

2010-07-12 Thread BLS
On 09/07/2010 14:04, Steven Schveighoffer wrote: Have you tried using composition? Thanks fro feedback Steve. No, NO Chance. The composite pattern requires inheritances (and the use of the composite pattern does not makes sense in our case) but also my idea of using the decorator patter

Re: std.pattern..mixin temptes..std.concurrency

2010-07-09 Thread Simen kjaeraas
Steven Schveighoffer wrote: I wish there was a way to optionally make the class final (i.e. make it a parameter). I first thought this to work: template bar( bool b ) { mixin( b ? "final:" : "" ); class bar { } } static assert( msg, __traits( isFinalClass, bar!true ) ); static a

Re: std.pattern..mixin temptes..std.concurrency

2010-07-09 Thread Steven Schveighoffer
On Thu, 08 Jul 2010 19:38:59 -0400, BLS wrote: 1) std.collections classes , as well as Steven's dcollections are final.. This keeps me away from sub classing and mixin a Publisher template. Have you tried using composition? The classes in dcollections are final for performance reasons. O

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread BLS
On 09/07/2010 01:04, Andrei Alexandrescu wrote: I think Observer is a very difficult pattern to make generic. There's very much variability. Here's an article I wrote about it: http://docs.google.com/viewer?url=http://erdani.com/publications/cuj-2005-04.pdf http://docs.google.com/viewer?url=ht

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread BLS
On 09/07/2010 01:04, Andrei Alexandrescu wrote: I think Observer is a very difficult pattern to make generic. There's very much variability. Here's an article I wrote about it: http://docs.google.com/viewer?url=http://erdani.com/publications/cuj-2005-04.pdf http://docs.google.com/viewer?url=ht

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread BLS
On 09/07/2010 01:04, Andrei Alexandrescu wrote: I think Observer is a very difficult pattern to make generic. There's very much variability. Here's an article I wrote about it: http://docs.google.com/viewer?url=http://erdani.com/publications/cuj-2005-04.pdf http://docs.google.com/viewer?url=ht

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread BLS
On 08/07/2010 23:37, Sean Kelly wrote: BLS Wrote: Would it makes sense to use the std.concurrency message passing system for OO patterns that require message passing ? I think so. It's certainly safer than the traditional callback method, and seems best to standardize on one form of noti

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread Andrei Alexandrescu
On 07/08/2010 10:26 AM, BLS wrote: Hi, Unfortunately Andrei has canceled his efforts on std.pattern. Despite that I would like to hear your opinion regarding std.patterns in general, I have a concrete problem in implementing patterns (like GOF stuff) with the help of mixin templates.. A concret

Re: std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread Sean Kelly
BLS Wrote: > > Would it makes sense to use the std.concurrency message passing system > for OO patterns that require message passing ? I think so. It's certainly safer than the traditional callback method, and seems best to standardize on one form of notification if at all practical to do so

std.pattern..mixin temptes..std.concurrency

2010-07-08 Thread BLS
Hi, Unfortunately Andrei has canceled his efforts on std.pattern. Despite that I would like to hear your opinion regarding std.patterns in general, I have a concrete problem in implementing patterns (like GOF stuff) with the help of mixin templates.. A concrete example (atm. an evolving idea