On May 9, 2012, at 7:30 AM, Andrei Alexandrescu wrote:

> http://www.reddit.com/r/programming/comments/telhj/voldemort_types_in_d/


One thing:


"and then use g. I know what you're thinking — use typeof and declare another 
instance of RandomNumberGenerator:

  auto g = generator(4);
  typeof(g) h;

Sorry, that won't work, the compiler will not allow a Voldemort Type to be 
instantiated outside of its scope (the technical reason is it has no reference 
to the seed local variable)."


If the struct were made static and given a ctor that seed were passed to, I 
imagine it would work, yes?

Reply via email to