There is assumeUnique which effectively does cast to immutable
but is more clear to the reader in a sense why breaking type
system was considered legit. I recommend using it over raw cast.
On Tuesday, 4 November 2014 at 16:07:11 UTC, thedeemon wrote:
On Tuesday, 4 November 2014 at 14:36:19 UTC, Chris wrote:
I'm still curious, though, how D handles this internally,
because data.data is still mutable while the other reference
to the same address (tmp) is not. What if I change data.
On Tuesday, 4 November 2014 at 14:36:19 UTC, Chris wrote:
I'm still curious, though, how D handles this internally,
because data.data is still mutable while the other reference to
the same address (tmp) is not. What if I change data.data while
the other thread is being executed?
"immutable" i
On Tuesday, 4 November 2014 at 14:47:49 UTC, anonymous wrote:
On Tuesday, 4 November 2014 at 14:36:19 UTC, Chris wrote:
I'm still curious, though, how D handles this internally,
because data.data is still mutable while the other reference
to the same address (tmp) is not. What if I change data.
On Tuesday, 4 November 2014 at 14:36:19 UTC, Chris wrote:
I'm still curious, though, how D handles this internally,
because data.data is still mutable while the other reference to
the same address (tmp) is not. What if I change data.data while
the other thread is being executed?
Changing *dat
On Tuesday, 4 November 2014 at 14:36:19 UTC, Chris wrote:
On Tuesday, 4 November 2014 at 14:01:16 UTC, anonymous wrote:
On Tuesday, 4 November 2014 at 12:47:11 UTC, Chris wrote:
The following
struct DATA {
short* data;
size_t len;
}
// data and len are provided by a C function
// ...
auto dat
On Tuesday, 4 November 2014 at 14:01:16 UTC, anonymous wrote:
On Tuesday, 4 November 2014 at 12:47:11 UTC, Chris wrote:
The following
struct DATA {
short* data;
size_t len;
}
// data and len are provided by a C function
// ...
auto data = mymodule.getSpeechData();
// cast to immutable, because
On Tuesday, 4 November 2014 at 12:47:11 UTC, Chris wrote:
The following
struct DATA {
short* data;
size_t len;
}
// data and len are provided by a C function
// ...
auto data = mymodule.getSpeechData();
// cast to immutable, because of concurrency
immutable short* tmp = cast(immutable)(data.d
The following
struct DATA {
short* data;
size_t len;
}
// data and len are provided by a C function
// ...
auto data = mymodule.getSpeechData();
// cast to immutable, because of concurrency
immutable short* tmp = cast(immutable)(data.data);
auto proc = spawn(&processData, thisTid);
send(proces
On Tuesday, 4 November 2014 at 12:47:11 UTC, Chris wrote:
The following
struct DATA {
short* data;
size_t len;
}
// data and len are provided by a C function
// ...
auto data = mymodule.getSpeechData();
// cast to immutable, because of concurrency
immutable short* tmp = cast(immutable)(data.d
10 matches
Mail list logo