Proposal: Move 'split' into a separate class in System.Random

Henning Thielemann schlepptop at henning-thielemann.de
Wed Sep 15 12:51:31 EDT 2010


Duncan Coutts schrieb:

>> Henning said:
>>
>>> class StraightRandomGen g where
>>>  System.Random.next :: g -> (Int, g)
>>>  System.Random.genRange :: g -> (Int, Int)
>>>
>>> class StraightRandomGen g => RandomGen g where
>> I favor a clean break with the past and small flurry of fixing
>> activity. The more concessions made in the base libraries the odder
>> all libraries will feel.
> 
> I agree. As much as possible I think we should deal with API changes
> using package versioning and not by making more convoluted names.

We have to introduce one new name in any case, whether for the class
that contains 'split' or for the class that does not contain 'split'.
Since many people expressed here that they happily use 'split', they may
also consider the class containing 'split' the main Random generator class.

Now we can call the class without split 'SimpleGen' in order to match
the simple name of 'SplittableGen'. However none of those names tell,
that they are about random generators. If we put a "Random" part in the
class name, it becomes a "convoluted" name.


More information about the Libraries mailing list