From owner-freebsd-current Mon Feb 17 16:54:36 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 474BB37B401; Mon, 17 Feb 2003 16:54:35 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6902443F85; Mon, 17 Feb 2003 16:54:34 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1I0sXQb009899; Mon, 17 Feb 2003 16:54:33 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1I0sWBF009898; Mon, 17 Feb 2003 16:54:32 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Mon, 17 Feb 2003 16:54:32 -0800 From: David Schultz To: "Jacques A. Vidrine" Cc: Tim Robbins , Kris Kennaway , "Andrey A. Chernov" , current@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib rand.c Message-ID: <20030218005432.GA9793@HAL9000.homeunix.com> Mail-Followup-To: "Jacques A. Vidrine" , Tim Robbins , Kris Kennaway , "Andrey A. Chernov" , current@FreeBSD.ORG References: <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au> <20030217130531.GA11276@madman.celabo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217130531.GA11276@madman.celabo.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Jacques A. Vidrine : > On Mon, Feb 17, 2003 at 04:40:48PM +1100, Tim Robbins wrote: > > I disagree. It's safe to use rand() in games and in certain kinds of > > simulations when you don't care that the distribution isn't quite > > uniform, > > Safe, maybe. But I think it still shouldn't be used. > See my posting of two years ago: > > > > BTW, I don't care if linking a program with rand() gives an obnoxious > warning or not. Just pointing out that rand() is less useful than it > might seem. Yes, as with most interfaces, there are ways to use rand() incorrectly. But there also exist ways to use it correctly. That's why people would get annoyed if their programs that have compiled for years start coughing up spurious warnings. rand() is not like gets(); it is almost impossible to use the latter in a robust program. On the other hand, I like the idea of people going out and fixing all the programs that use rand() incorrectly. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message