Mir Random [WIP]

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 24 01:25:37 PST 2016


On Thursday, 24 November 2016 at 08:59:03 UTC, Kagamin wrote:
> On Wednesday, 23 November 2016 at 19:40:47 UTC, Ilya Yaroshenko 
> wrote:
>> Current adaptor should be used in a function scope. (Would be 
>> great to have a DIP for that kind of semantic check). An RC 
>> adaptor can be added too. First we need to find a real world 
>> use case where we need to store a random range outside of a 
>> function. -- Ilya
>
> You want to instantiate and seed Mt every time you call a 
> function that may need random numbers?

A function can use a global RNG defined by a user or accepts RNG 
by reference. Range adaptor stores pointer, not value.


More information about the Digitalmars-d mailing list