On 02/09/13 19:31, Artur Skawina wrote:
"Fixing" type system bugs by adding library helpers is not really a good idea. '.funcptr' returning incorrect type (and 'typeof(T.method)' etc) needs to be fixed properly. Until that happens, the alternatives are: a) convention - don't directly access these wrongly-typed pointers; b) cast to (void*) (or the correct type) and back; ugly and still un@safe; c) wrap the pointer, this way it's at least a little bit harder to mistakenly use the bogus type.
Do you want to take a quick look at the proposed patch to std.random and see if there's anything obviously risky about it? No pressure, but would be nice to have your comments.
https://github.com/D-Programming-Language/phobos/pull/1533/files