Flame bait: D vs. Rust vs. Go Benchmarking
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Wed Jul 24 13:45:59 PDT 2013
On Wednesday, 24 July 2013 at 19:54:19 UTC, Andrei Alexandrescu
wrote:
> What are the other problems aside from value semantics?
The serious problems mostly derive _from_ the value semantics.
They include the annoying (if you forget to add "ref" when
passing to a function, the source RNG won't get updated and your
program will have unwanted correlations) and the critical (you
can't safely store a copy of an RNG inside another object without
it being a copy, which again means the source RNG won't be
updated); this latter means that the design of ranges that "wrap"
an RNG, like RandomCover and RandomSample, can't be given an
arbitrary RNG to use without generating unwanted correlations.
In short, having them as value types makes it impossible to
design tools like RandomCover etc. to be correct, safe and
straightforward.
There are other issues there, but they are mainly implementation
errors that can be fixed (I've fixed several of them recently and
will carry on doing so). All the fundamental problems stem from
the value semantics.
More information about the Digitalmars-d
mailing list