A comparison between Rust and D
jmh530 via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 24 10:37:20 PDT 2016
On Friday, 24 June 2016 at 17:26:58 UTC, maik klein wrote:
> https://maikklein.github.io/post/cmp-rust-d/
>
> https://www.reddit.com/r/programming/comments/4po2j5/a_comparison_between_rust_and_d/
On interior mutability in arrays, does this help:
void main()
{
immutable(int)[] x = [1, 2, 3];
x = [2, 3, 4]; //this works
x[0] = 1; //this doesn't
immutable(int[]) y = [1, 2, 3];
y = [2, 3, 4]; //this doesn't
y[0] = 1; //this doesn't
}
More information about the Digitalmars-d
mailing list