www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: default random object?

Don:
 arr[random(0..arr.length)]
 is likely to be an _extremely_ common usage pattern. That argues very 
 strongly for "[)".

For that there's choice(): choice(arr) Bye, bearophile
Feb 15 2009