default random object?

Don nospam at nospam.com
Sun Feb 15 00:20:38 PST 2009


Walter Bright wrote:
> Jason House wrote:
>> D uses a..b notation as part of the language to mean "[)". Because of
>> that, it makes more sense to make that the default in D vs. other
>> languages that don't have such constructs.
> 
> I think that's exactly right. Consistency is very important.

Agreed. Note that

arr[random(0..arr.length)]

is likely to be an _extremely_ common usage pattern. That argues very 
strongly for "[)".



More information about the Digitalmars-d mailing list