Date: Sun, 2 Feb 2003 18:43:56 +0300 From: "Andrey A. Chernov" <ache@nagual.pp.ru> To: Mark Murray <mark@grondar.org> Cc: "Jeroen C. van Gelderen" <jeroen@vangelderen.org>, phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202154356.GA65166@nagual.pp.ru> In-Reply-To: <200302021532.h12FWWaX047973@grimreaper.grondar.org> References: <F76A9070-36B1-11D7-A58F-000393754B1C@vangelderen.org> <200302021532.h12FWWaX047973@grimreaper.grondar.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 02, 2003 at 15:32:32 +0000, Mark Murray wrote: > "Jeroen C. van Gelderen" writes: > > Wouldn't it be a good idea to change the name at the same time? Or > > should it be retained for compatibility reasons with other BSDs? > > > > Currently the name needlessly exposes implementation detail. Callers > > expect good, cheap, non-blocking randomness but don't give a hoot if > > that is actually provided trough use of RC4 or not. I see no reason why > > the implementation could be changed if the contract is maintained. > > Good point. We can re-implement random() internally with arc4rand(). > > Objections? We can't, simple because sequence must be repeated for the same seed across the calls. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030202154356.GA65166>