[Issue 10427] No opEquals method in std.random.MersenneTwisterEngine

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 20 14:21:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10427


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-06-20 14:21:02 PDT ---
How is this a bug? It doesn't _need_ an opEquals, so it would be bad practice
to add one. If it's changed to a reference type, _then_ you need opEquals, and
you implement it. But until it's a reference type, opEquals is unnnecessary,
and not having it is most definitely not a bug.

If anything, the fact that XOrshiftEngine and LinearCongruentialEngine have
opEquals have opEquals is the bug. As far as I can tell, they don't need them.
Please _don't_ declare opEquals on types that don't need them. It _increases_
the chances of there being a bug, because the opEquals could be wrong. It could
also be less efficient than what the compiler would have done on its own.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list