--- Comment #5 from Vladimir Panteleev <> 2011-12-06 
08:04:49 PST ---
The disadvantages of breaking backwards compatibility need to be considered on
a case-by-case basis. I think that turning RNGs into reference types has the
potential to be a relatively low-impact change, while also having a good chance
of revealing broken code.

The typical usage of std.random does not involve using the RNG types directly,
and rather using the implicit thread-local RNG.

An example of affected code:

Random r;
// ... use r

I think that generally allowing such code is a mistake, because it's not clear
that the RNG is not seeded.

auto r = Random(42);

We can implement this for backwards compatibility using static opCall (which
shall be scheduled for deprecation).

The biggest problem is intentional usage of value semantics (it would
transparently turn into reference semantics). Perhaps there's something we
could do with the help of opAssign?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to