[m-rev.] time additions (was Re: for review: Add random.init/3)

Mark Brown mark at mercurylang.org
Sat May 28 14:48:16 AEST 2016


Hi,

On Sat, May 28, 2016 at 12:50 PM, Julien Fischer <jfischer at opturion.com> wrote:
> On Fri, 27 May 2016, Sebastian Godelet wrote:
>>> The ultimate problem here is that Mercury's current random and time
>>> modules are simply not very good.  For random, what the standard library
>>> *should* be providing is a generic interface to random number generators
>>> in general (e.g. something along the lines of Boost.Random, but using
>>> type classes), along with some actual instances of generators.
>>
>>
>> Yes if I understood correctly typeclasses are not used that much in
>> the standard library since they pre-date it, right?
>
>
> To a large extent; the lack of support for constructor classes in the
> type class system has also meant that it isn't quite expressive enough
> to make their wholesale addition to the standard library worth it.

Providing an interface to random number generators is not a wholesale
addition, though. Is there any proposal for such an interface that
actually involves constructor classes? (Or is this more of an excuse
than a reason ;-))

Mark


More information about the reviews mailing list