http://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful
> -----Original Message----- > From: development-bounces+tvaneerd=rim....@qt-project.org > [mailto:development-bounces+tvaneerd=rim....@qt-project.org] On > Behalf Of Thiago Macieira > Sent: Tuesday, February 11, 2014 11:15 AM > To: development@qt-project.org > Subject: Re: [Development] websockets (was RE: Qt 5.3 Feature freeze is > coming quite soon...) > > Em ter 11 fev 2014, às 09:04:39, Konrad Rosenbaum escreveu: > > Please don't go there. AFAIK qrand() is a function meant to be > > equivalent to the ANSI-C rand() function. I.e. it is supposed to be > > used by simple simulations, be fast and produce reproducable random > > numbers when seeded with the same value. > > Fast? yes. > > Needs to produce reproduceable sequence? Yes, but only because of unit > testing. > > Equal to rand()? I'm not sure we need to keep that. > > My idea was to simply securely pre-seed the PRNG before you had a chance > to use it, in each thread. If you need to seed it to something constant to get > constant results, you'd still be able to. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development