Re: Overzealous immutable and classes

2010-07-15 Thread bearophile
Jonathan M Davis: > It's not terribly pretty, but apparently no one could come up with a > satistfactory way of doing it in the language itself given the syntax for > references. So, Rebindable!(T) is the solution. A helper function can help: import std.stdio, std.typecons, std.traits; templat

Re: Overzealous immutable and classes

2010-07-15 Thread Gareth Charnock
On 16/07/10 02:08, Jonathan M Davis wrote: On Thursday, July 15, 2010 17:40:26 Gareth Charnock wrote: So having got a collectors' edition TDPL, I though I'd have a try at writing some concurrent code. The idea was a worker thread(s) would do some work and write the results to some immutable obje

Re: Overzealous immutable and classes

2010-07-15 Thread Jonathan M Davis
On Thursday, July 15, 2010 17:40:26 Gareth Charnock wrote: > So having got a collectors' edition TDPL, I though I'd have a try at > writing some concurrent code. The idea was a worker thread(s) would do > some work and write the results to some immutable objects. These would > get passed to an inde

Overzealous immutable and classes

2010-07-15 Thread Gareth Charnock
So having got a collectors' edition TDPL, I though I'd have a try at writing some concurrent code. The idea was a worker thread(s) would do some work and write the results to some immutable objects. These would get passed to an indexer thread that would do neat stuff like indexing the reference