Mir Random [WIP]

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 22 16:30:25 PST 2016


On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu 
wrote:
> On 11/22/16 1:31 AM, Ilya Yaroshenko wrote:
>>  - `opCall` API instead of range interface is used (similar to 
>> C++)
>
> This seems like a gratuitous departure from common D practice. 
> Random number generators are most naturally modeled in D as 
> infinite ranges. -- Andrei

I'm pretty sure everyone *wants* it to be a range, but it turns 
out it's a difficult design space. Lot's of nasty trade-offs that 
can be (and have been) argued back and forth depending on your 
priorities.

Perhaps you have an insight that has been missed that can make a 
good rng range without causing less than optimal performance or 
statistically unsafe default behaviour?

IIRC you think people are making too much fuss about the 
statistically safe default behaviour, but it would be interesting 
to hear a more expanded version of that view.


More information about the Digitalmars-d mailing list