Re: Immutable Structs and std.concurrency

2012-04-19 Thread Timon Gehr
On 04/19/2012 11:55 PM, Jakob Ovrum wrote: On Thursday, 19 April 2012 at 21:33:46 UTC, Timon Gehr wrote: Unfortunately the patch is incomplete. (template parameter matching is not implemented afaik and it does not work for structs) Ah, didn't know about the template blocker, but how should it

Re: Immutable Structs and std.concurrency

2012-04-19 Thread Jakob Ovrum
On Thursday, 19 April 2012 at 21:33:46 UTC, Timon Gehr wrote: Unfortunately the patch is incomplete. (template parameter matching is not implemented afaik and it does not work for structs) Ah, didn't know about the template blocker, but how should it work for structs? Shouldn't the syntax onl

Re: Immutable Structs and std.concurrency

2012-04-19 Thread Timon Gehr
On 04/19/2012 11:11 PM, Jakob Ovrum wrote: Fixing std.concurrency entails fixing std.variant which entails fixing std.typecons.Rebindable by moving its functionality into the language where it belongs. https://github.com/D-Programming-Language/dmd/pull/3 This one has been lurking around foreve

Re: Immutable Structs and std.concurrency

2012-04-19 Thread Jakob Ovrum
On Thursday, 19 April 2012 at 16:26:19 UTC, Timon Gehr wrote: On 04/19/2012 03:27 PM, Russel Winder wrote: The program: import std.concurrency ; import std.stdio ; /*immutable*/ struct X { int i ; } void printI ( ) { receive ( ( X x

Re: Immutable Structs and std.concurrency

2012-04-19 Thread Timon Gehr
On 04/19/2012 03:27 PM, Russel Winder wrote: The program: import std.concurrency ; import std.stdio ; /*immutable*/ struct X { int i ; } void printI ( ) { receive ( ( X x ) { writeln ( x.i ) ; } ) ;

Immutable Structs and std.concurrency

2012-04-19 Thread Russel Winder
The program: import std.concurrency ; import std.stdio ; /*immutable*/ struct X { int i ; } void printI ( ) { receive ( ( X x ) { writeln ( x.i ) ; } ) ; } int main ( immutabl