std.functional.memoize : thread local or __gshared memoization?
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 25 12:57:17 PDT 2017
On Thursday, 25 May 2017 at 14:56:25 UTC, Jonathan M Davis wrote:
> able to do so with the excuse that shared is not complete. But
> the idea that you do almost nothing with an object that is
> shared without casting it first (after protecting it
> appropriately with a mutex of course) except for using atomics
> seems to be too much for many folks, even though aside from the
> cast, the way you actually use a shared object is basically
> what you'd do in C/C++. I'd say that ultimately, shared is more
> for storing the object and protecting it against operations
> that could operate on it incorrectly than it is for actually
> operating on the object.
You should look at Pony which has a sound type system for
transitioning objects read/write local/shared:
https://tutorial.ponylang.org/capabilities/reference-capabilities.html
It is kinda like Rust, but more advanced.
More information about the Digitalmars-d
mailing list