Pitfalls of delegates inside ranges
    Joseph Rushton Wakeling 
    joseph.wakeling at webdrake.net
       
    Mon Sep  2 11:21:40 PDT 2013
    
    
  
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 at 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
    
    
More information about the Digitalmars-d-learn
mailing list